summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/InspIRCd.dev52
-rw-r--r--src/InspIRCd.layout125
-rw-r--r--src/modules/m_blockcolor.cpp13
-rw-r--r--src/modules/m_knock.cpp4
-rw-r--r--src/modules/m_noctcp.cpp13
-rw-r--r--src/modules/m_nokicks.cpp15
-rw-r--r--src/modules/m_nonicks.cpp92
-rw-r--r--src/modules/m_nonotice.cpp13
8 files changed, 278 insertions, 49 deletions
diff --git a/src/InspIRCd.dev b/src/InspIRCd.dev
index 845b0de03..779b9174e 100644
--- a/src/InspIRCd.dev
+++ b/src/InspIRCd.dev
@@ -1,7 +1,7 @@
[Project]
FileName=InspIRCd.dev
Name=InspIRCd - The Inspire Internet Relay Chat Daemon
-UnitCount=55
+UnitCount=60
Type=1
Ver=1
ObjFiles=
@@ -595,3 +595,53 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=
+[Unit56]
+FileName=modules\m_nonotice.cpp
+CompileCpp=1
+Folder=Modules/Server
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit57]
+FileName=modules\m_knock.cpp
+CompileCpp=1
+Folder=Modules/Server
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit58]
+FileName=modules\m_noctcp.cpp
+CompileCpp=1
+Folder=Modules/Server
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit59]
+FileName=modules\m_blockcolor.cpp
+CompileCpp=1
+Folder=Modules/Server
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit60]
+FileName=modules\m_nonicks.cpp
+CompileCpp=1
+Folder=Modules/Server
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout
index 6cfb8dd38..5e48503f6 100644
--- a/src/InspIRCd.layout
+++ b/src/InspIRCd.layout
@@ -1,21 +1,21 @@
[Editors]
-Focused=43
-Order=2,4,6,3,7,25,5,24,39,42,43,-1,1,46,0,49
+Focused=-1
+Order=2,4,6,3,7,25,5,24,39,42,43,1,46,0,49,-1
[Editor_0]
Open=1
Top=0
CursorCol=39
CursorRow=78
-TopLine=35
+TopLine=26
LeftChar=1
[Editor_1]
Open=1
Top=0
-CursorCol=1
-CursorRow=99
-TopLine=73
+CursorCol=36
+CursorRow=1450
+TopLine=1419
LeftChar=1
[Editor_2]
@@ -23,7 +23,7 @@ Open=1
Top=0
CursorCol=21
CursorRow=489
-TopLine=437
+TopLine=428
LeftChar=1
[Editor_3]
@@ -31,7 +31,7 @@ Open=1
Top=0
CursorCol=2
CursorRow=82
-TopLine=28
+TopLine=19
LeftChar=1
[Editor_4]
@@ -55,7 +55,7 @@ Open=1
Top=0
CursorCol=1
CursorRow=117
-TopLine=94
+TopLine=87
LeftChar=1
[Editor_7]
@@ -67,7 +67,7 @@ TopLine=1
LeftChar=1
[Editor_8]
-Open=1
+Open=0
Top=0
CursorCol=50
CursorRow=31
@@ -75,7 +75,7 @@ TopLine=1
LeftChar=1
[Editor_9]
-Open=1
+Open=0
Top=0
CursorCol=17
CursorRow=65
@@ -91,7 +91,7 @@ TopLine=70
LeftChar=1
[Editor_11]
-Open=1
+Open=0
Top=0
CursorCol=39
CursorRow=6
@@ -115,7 +115,7 @@ TopLine=197
LeftChar=1
[Editor_14]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=18
@@ -131,7 +131,7 @@ TopLine=41
LeftChar=1
[Editor_16]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=45
@@ -141,13 +141,13 @@ LeftChar=1
[Editor_17]
Open=1
Top=0
-CursorCol=46
+CursorCol=4
CursorRow=114
-TopLine=106
+TopLine=99
LeftChar=1
[Editor_18]
-Open=1
+Open=0
Top=0
CursorCol=6
CursorRow=20
@@ -155,7 +155,7 @@ TopLine=1
LeftChar=1
[Editor_19]
-Open=0
+Open=1
Top=0
CursorCol=21
CursorRow=7
@@ -165,13 +165,13 @@ LeftChar=1
[Editor_20]
Open=1
Top=0
-CursorCol=25
-CursorRow=380
-TopLine=332
+CursorCol=64
+CursorRow=268
+TopLine=236
LeftChar=1
[Editor_21]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=63
@@ -209,42 +209,42 @@ CursorRow=77
TopLine=77
LeftChar=1
[Editor_26]
-Open=1
+Open=0
Top=0
CursorCol=2
CursorRow=73
TopLine=32
LeftChar=1
[Editor_27]
-Open=1
+Open=0
Top=0
CursorCol=13
CursorRow=50
TopLine=6
LeftChar=1
[Editor_28]
-Open=1
+Open=0
Top=0
CursorCol=87
CursorRow=20
TopLine=5
LeftChar=1
[Editor_29]
-Open=1
+Open=0
Top=0
CursorCol=70
CursorRow=21
TopLine=1
LeftChar=1
[Editor_30]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=34
TopLine=1
LeftChar=1
[Editor_31]
-Open=1
+Open=0
Top=0
CursorCol=2
CursorRow=40
@@ -258,35 +258,35 @@ CursorRow=57
TopLine=28
LeftChar=1
[Editor_33]
-Open=1
+Open=0
Top=0
CursorCol=23
CursorRow=36
TopLine=10
LeftChar=1
[Editor_34]
-Open=1
+Open=0
Top=0
CursorCol=38
CursorRow=35
TopLine=8
LeftChar=1
[Editor_35]
-Open=1
+Open=0
Top=0
CursorCol=2
CursorRow=51
TopLine=24
LeftChar=1
[Editor_36]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=34
TopLine=1
LeftChar=1
[Editor_37]
-Open=1
+Open=0
Top=0
CursorCol=13
CursorRow=160
@@ -307,7 +307,7 @@ CursorRow=165
TopLine=139
LeftChar=1
[Editor_40]
-Open=1
+Open=0
Top=0
CursorCol=1
CursorRow=31
@@ -323,26 +323,26 @@ LeftChar=1
[Editor_42]
Open=1
Top=0
-CursorCol=10
+CursorCol=3
CursorRow=1261
TopLine=1232
LeftChar=1
[Editor_43]
Open=1
-Top=1
+Top=0
CursorCol=10
CursorRow=285
TopLine=249
LeftChar=1
[Editor_44]
-Open=1
+Open=0
Top=0
CursorCol=64
CursorRow=64
TopLine=1
LeftChar=1
[Editor_45]
-Open=1
+Open=0
Top=0
CursorCol=12
CursorRow=122
@@ -363,7 +363,7 @@ CursorRow=157
TopLine=4
LeftChar=1
[Editor_48]
-Open=1
+Open=0
Top=0
CursorCol=11
CursorRow=82
@@ -384,14 +384,14 @@ CursorRow=211
TopLine=167
LeftChar=1
[Editor_51]
-Open=1
+Open=0
Top=0
CursorCol=12
CursorRow=57
TopLine=19
LeftChar=1
[Editor_52]
-Open=1
+Open=0
Top=0
CursorCol=2
CursorRow=39
@@ -400,14 +400,49 @@ LeftChar=1
[Editor_53]
Open=1
Top=0
+CursorCol=13
+CursorRow=39
+TopLine=10
+LeftChar=1
+[Editor_54]
+Open=1
+Top=0
CursorCol=1
-CursorRow=58
+CursorRow=21
TopLine=1
LeftChar=1
-[Editor_54]
+[Editor_55]
Open=1
Top=0
CursorCol=1
-CursorRow=29
-TopLine=14
+CursorRow=1
+TopLine=1
+LeftChar=1
+[Editor_56]
+Open=1
+Top=0
+CursorCol=53
+CursorRow=7
+TopLine=1
+LeftChar=1
+[Editor_57]
+Open=1
+Top=0
+CursorCol=1
+CursorRow=1
+TopLine=1
+LeftChar=1
+[Editor_58]
+Open=1
+Top=0
+CursorCol=1
+CursorRow=1
+TopLine=1
+LeftChar=1
+[Editor_59]
+Open=1
+Top=1
+CursorCol=2
+CursorRow=37
+TopLine=1
LeftChar=1
diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp
index 4d1a3500d..58ee4da8b 100644
--- a/src/modules/m_blockcolor.cpp
+++ b/src/modules/m_blockcolor.cpp
@@ -55,6 +55,19 @@ class ModuleBlockColor : public Module
return 0;
}
+ virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params)
+ {
+ // check if this is our mode character...
+ if ((modechar == 'c') && (type == MT_CHANNEL))
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
virtual ~ModuleBlockColor()
{
delete Srv;
diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp
index 12ad69b13..2569214df 100644
--- a/src/modules/m_knock.cpp
+++ b/src/modules/m_knock.cpp
@@ -4,7 +4,7 @@
#include "channels.h"
#include "modules.h"
-/* $ModDesc: Provides support for unreal-style GLOBOPS and umode +g */
+/* $ModDesc: Provides support for /KNOCK and mode +K */
Server *Srv;
@@ -26,7 +26,7 @@ void handle_knock(char **parameters, int pcnt, userrec *user)
}
if (c->inviteonly)
{
- WriteChannelWithServ(Srv->GetServerName().c_str(),c,user,"NOTICE %s :User %s is KNOCKing on %s (%s)",c->name,user->nick,c->name,line.c_str());
+ WriteChannelWithServ((char*)Srv->GetServerName().c_str(),c,user,"NOTICE %s :User %s is KNOCKing on %s (%s)",c->name,user->nick,c->name,line.c_str());
WriteServ(user->fd,"NOTICE %s :KNOCKing on %s",user->nick,c->name);
return;
}
diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp
index 1b1f56397..a5d472d45 100644
--- a/src/modules/m_noctcp.cpp
+++ b/src/modules/m_noctcp.cpp
@@ -58,6 +58,19 @@ class ModuleNoCTCP : public Module
return 0;
}
+ virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params)
+ {
+ // check if this is our mode character...
+ if ((modechar == 'C') && (type == MT_CHANNEL))
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
virtual ~ModuleNoCTCP()
{
delete Srv;
diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp
index b90932e6c..582b3209a 100644
--- a/src/modules/m_nokicks.cpp
+++ b/src/modules/m_nokicks.cpp
@@ -17,7 +17,7 @@ class ModuleNoKicks : public Module
Srv = new Server;
Srv->AddExtendedMode('Q',MT_CHANNEL,false,0,0);
}
-
+
virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type)
{
if (access_type == AC_KICK)
@@ -40,6 +40,19 @@ class ModuleNoKicks : public Module
return ACR_DEFAULT;
}
+ virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params)
+ {
+ // check if this is our mode character...
+ if ((modechar == 'Q') && (type == MT_CHANNEL))
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
virtual ~ModuleNoKicks()
{
delete Srv;
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
new file mode 100644
index 000000000..d46525152
--- /dev/null
+++ b/src/modules/m_nonicks.cpp
@@ -0,0 +1,92 @@
+#include <stdio.h>
+#include <string>
+#include "users.h"
+#include "channels.h"
+#include "modules.h"
+
+/* $ModDesc: Provides support for unreal-style GLOBOPS and umode +g */
+
+Server *Srv;
+
+class ModuleNoNickChange : public Module
+{
+ public:
+ ModuleNoNickChange()
+ {
+ Srv = new Server;
+
+ Srv->AddExtendedMode('N',MT_CHANNEL,false,0,0);
+ }
+
+ virtual ~ModuleNoNickChange()
+ {
+ delete Srv;
+ }
+
+ virtual Version GetVersion()
+ {
+ return Version(1,0,0,1);
+ }
+
+ virtual int OnUserPreNick(userrec* user, std::string newnick)
+ {
+ if (!strcasecmp(user->server,Srv->GetServerName().c_str()))
+ {
+ for (int i =0; i != MAXCHANS; i++)
+ {
+ if (user->chans[i].channel != NULL)
+ {
+ chanrec* curr = user->chans[i].channel;
+ if (curr->IsCustomModeSet('N'))
+ {
+ // don't allow the nickchange, theyre on at least one channel with +N set
+ WriteServ(user->fd,"447 %s :Can't change nickname while on %s (+N is set)",user->nick,curr->name);
+ return 1;
+ }
+ }
+ }
+ }
+ return 0;
+ }
+
+ virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params)
+ {
+ // check if this is our mode character...
+ if ((modechar == 'N') && (type == MT_CHANNEL))
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+};
+
+// stuff down here is the module-factory stuff. For basic modules you can ignore this.
+
+class ModuleNoNickChangeFactory : public ModuleFactory
+{
+ public:
+ ModuleNoNickChangeFactory()
+ {
+ }
+
+ ~ModuleNoNickChangeFactory()
+ {
+ }
+
+ virtual Module * CreateModule()
+ {
+ return new ModuleNoNickChange;
+ }
+
+};
+
+
+extern "C" void * init_module( void )
+{
+ return new ModuleNoNickChangeFactory;
+}
+
diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp
index 23c529bfc..f501cc307 100644
--- a/src/modules/m_nonotice.cpp
+++ b/src/modules/m_nonotice.cpp
@@ -38,6 +38,19 @@ class ModuleNoNotice : public Module
}
return 0;
}
+
+ virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params)
+ {
+ // check if this is our mode character...
+ if ((modechar == 'T') && (type == MT_CHANNEL))
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
virtual ~ModuleNoNotice()
{