From 457362304bba836737f2955f7e871cef431a069e Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 15 Dec 2006 17:32:16 +0000 Subject: Cleaning up irrelevent stuff in channels.cpp git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5993 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 42 +++++++++++------------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 4408c1938..d67f96e4f 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -439,13 +439,11 @@ char* userrec::GetFullRealHost() return fresult; } -bool userrec::IsInvited(irc::string &channel) +bool userrec::IsInvited(const irc::string &channel) { for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) { - irc::string compare = i->channel; - - if (compare == channel) + if (channel == *i) { return true; } @@ -458,30 +456,22 @@ InvitedList* userrec::GetInviteList() return &invites; } -void userrec::InviteTo(irc::string &channel) +void userrec::InviteTo(const irc::string &channel) { - Invited i; - i.channel = channel; - invites.push_back(i); + invites.push_back(channel); } -void userrec::RemoveInvite(irc::string &channel) +void userrec::RemoveInvite(const irc::string &channel) { ServerInstance->Log(DEBUG,"Removing invites"); - - if (invites.size()) + for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) { - for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) + if (channel == *i) { - irc::string compare = i->channel; - - if (compare == channel) - { - invites.erase(i); - return; - } - } - } + invites.erase(i); + return; + } + } } bool userrec::HasPermission(const std::string &command) @@ -1762,16 +1752,6 @@ bool userrec::SharesChannelWith(userrec *other) return false; } -int userrec::CountChannels() -{ - return ChannelCount; -} - -void userrec::ModChannelCount(int n) -{ - ChannelCount += n; -} - bool userrec::ChangeName(const char* gecos) { if (!strcmp(gecos, this->fullname)) -- cgit v1.3.1-10-gc9f91