diff options
| author | 2008-08-07 18:18:27 +0000 | |
|---|---|---|
| committer | 2008-08-07 18:18:27 +0000 | |
| commit | 51fe316e69dad7d3c51609199d4010da7692dc98 (patch) | |
| tree | 9d523162389a6d94523afad43f7791183d3b0074 /src/users.cpp | |
| parent | Fix 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.cpp | 7 |
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); } |
