summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/inspircd.cpp4
-rw-r--r--src/users.cpp9
2 files changed, 11 insertions, 2 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 0ab72bf21..a725755a7 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -1644,7 +1644,7 @@ bool is_valid_cmd(const char* commandname, int pcnt, userrec * user)
{
if (cmdlist[i].flags_needed)
{
- if (user->HasPermission((char*)commandname))
+ if ((user->HasPermission((char*)commandname)) || (is_uline(user->server)))
{
return true;
}
@@ -1678,7 +1678,7 @@ void call_handler(const char* commandname,char **parameters, int pcnt, userrec *
{
if (cmdlist[i].flags_needed)
{
- if (user->HasPermission((char*)commandname))
+ if ((user->HasPermission((char*)commandname)) || (is_uline(user->server)))
{
cmdlist[i].handler_function(parameters,pcnt,user);
}
diff --git a/src/users.cpp b/src/users.cpp
index 19d6a37f4..2c36a444c 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -161,6 +161,15 @@ bool userrec::HasPermission(char* command)
char* savept;
char* savept2;
+ // users on u-lined servers can completely bypass
+ // all permissions based checks.
+ //
+ // of course, if this is sent to a remote server and this
+ // server is not ulined there, then that other server
+ // silently drops the command.
+ if (is_uline(this->server))
+ return true;
+
// are they even an oper at all?
if (strchr(this->modes,'o'))
{