diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 9 | ||||
-rw-r--r-- | src/users.cpp | 7 |
2 files changed, 3 insertions, 13 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index fe0e0600b..072634253 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -727,11 +727,7 @@ bool Channel::Kick(BotInfo *bi, User *u, const char *reason, ...) vsnprintf(buf, BUFSIZE - 1, reason, args); va_end(args); - /* May not kick ulines */ - if (u->server->IsULined()) - return false; - - /* Do not kick protected clients */ + /* Do not kick protected clients or Ulines */ if (u->IsProtected()) return false; @@ -863,9 +859,6 @@ bool Channel::CheckKick(User *user) /* We don't enforce services restrictions on clients on ulined services * as this will likely lead to kick/rejoin floods. ~ Viper */ - if (user->server->IsULined()) - return false; - if (user->IsProtected()) return false; diff --git a/src/users.cpp b/src/users.cpp index 088aa5a67..b9564a2d5 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -642,12 +642,9 @@ ChanUserContainer *User::FindChannel(Channel *c) const return NULL; } -bool User::IsProtected() const +bool User::IsProtected() { - if (this->HasMode("PROTECTED") || this->HasMode("GOD")) - return true; - - return false; + return this->HasMode("PROTECTED") || this->HasMode("GOD") || this->HasPriv("protected") || (this->server && this->server->IsULined()); } void User::Kill(const MessageSource &source, const Anope::string &reason) |