summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-02 14:03:28 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-02 14:03:28 +0000
commit4fb13263bfd2325184caf98f48163a9e63f755fa (patch)
tree08bbf49fab96e3cdbcebe63ee01acb445b00eb47 /src
parent4102508f95a9c62cd92a361667b87e8bae16c474 (diff)
Added ability for ulined servers to set any arbitary channel mode (even from outside the channel)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2113 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/message.cpp8
-rw-r--r--src/mode.cpp2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/message.cpp b/src/message.cpp
index 787071d8a..073c54d02 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -41,6 +41,7 @@ using namespace std;
#include "modules.h"
#include "dynamic.h"
#include "wildcard.h"
+#include "commands.h"
#include "message.h"
#include "inspstring.h"
#include "dns.h"
@@ -307,6 +308,10 @@ char* cmode(userrec *user, chanrec *chan)
log(DEFAULT,"*** BUG *** cmode was given an invalid parameter");
return "";
}
+
+ if (is_uline(user->server))
+ return "@";
+
for (int i = 0; i != MAXCHANS; i++)
{
if (user->chans[i].channel)
@@ -344,6 +349,9 @@ int cstatus(userrec *user, chanrec *chan)
return 0;
}
+ if (is_uline(user->server))
+ return STATUS_OP;
+
for (int i = 0; i != MAXCHANS; i++)
{
if (user->chans[i].channel)
diff --git a/src/mode.cpp b/src/mode.cpp
index d1c63702f..e9b6861c0 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -1517,7 +1517,7 @@ void handle_mode(char **parameters, int pcnt, userrec *user)
}
}
- if ((Ptr) && (!has_channel(user,Ptr)))
+ if (((Ptr) && (!has_channel(user,Ptr))) && (!is_uline(user->server)))
{
WriteServ(user->fd,"442 %s %s :You're not on that channel!",user->nick, Ptr->name);
return;