summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/extern.h11
-rw-r--r--include/services.h19
-rw-r--r--src/ircd.c72
-rw-r--r--src/protocol/bahamut.c37
-rw-r--r--src/protocol/bahamut.h7
-rw-r--r--src/protocol/charybdis.c33
-rw-r--r--src/protocol/charybdis.h8
-rw-r--r--src/protocol/dreamforge.c11
-rw-r--r--src/protocol/dreamforge.h9
-rw-r--r--src/protocol/hybrid.c47
-rw-r--r--src/protocol/hybrid.h8
-rw-r--r--src/protocol/inspircd10.c11
-rw-r--r--src/protocol/inspircd10.h8
-rw-r--r--src/protocol/inspircd11.c37
-rwxr-xr-xsrc/protocol/inspircd11.h8
-rw-r--r--src/protocol/plexus2.c31
-rw-r--r--src/protocol/plexus2.h8
-rw-r--r--src/protocol/plexus3.c31
-rw-r--r--src/protocol/plexus3.h8
-rw-r--r--src/protocol/ptlink.c43
-rw-r--r--src/protocol/ptlink.h10
-rw-r--r--src/protocol/rageircd.c17
-rw-r--r--src/protocol/rageircd.h8
-rw-r--r--src/protocol/ratbox.c35
-rw-r--r--src/protocol/ratbox.h8
-rw-r--r--src/protocol/shadowircd.c33
-rw-r--r--src/protocol/shadowircd.h8
-rw-r--r--src/protocol/solidircd.c39
-rw-r--r--src/protocol/solidircd.h8
-rw-r--r--src/protocol/ultimate2.c11
-rw-r--r--src/protocol/ultimate2.h8
-rw-r--r--src/protocol/ultimate3.c27
-rw-r--r--src/protocol/ultimate3.h8
-rw-r--r--src/protocol/unreal31.c15
-rw-r--r--src/protocol/unreal31.h7
-rw-r--r--src/protocol/unreal32.c27
-rw-r--r--src/protocol/unreal32.h7
-rw-r--r--src/protocol/viagra.c13
-rw-r--r--src/protocol/viagra.h8
39 files changed, 424 insertions, 320 deletions
diff --git a/include/extern.h b/include/extern.h
index 85acc59a5..8b371167c 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -6,9 +6,9 @@
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
- * $Id$
+ * Based on the original code of Services by Andy Church.
+ *
+ * $Id$
*
*/
@@ -562,7 +562,7 @@ E char *DefConAkillReason;
E char *DefConOffMessage;
E long unsigned int UserKey1;
-E long unsigned int UserKey2;
+E long unsigned int UserKey2;
E long unsigned int UserKey3;
/**** converter.c ****/
@@ -608,6 +608,7 @@ E int init_secondary(int ac, char **av);
E int servernum;
/**** ircd.c ****/
+E void pmodule_ircd_proto(IRCDProtoNew *);
E void pmodule_set_mod_current_buffer(void (*func) (int ac, char **av));
E void pmodule_cmd_svsnoop(void (*func) (const char *server, int set));
E void pmodule_cmd_remove_akill(void (*func) (const char *user, const char *host));
@@ -1001,7 +1002,7 @@ E int check_szline(char *nick, char *ip);
E Server *server_global(Server * s, char *msg);
-E int OSOpersOnly;
+E int OSOpersOnly;
E time_t DefContimer;
E void runDefCon(void);
E int defconParseModeString(const char *str);
diff --git a/include/services.h b/include/services.h
index 3eca6381b..09ee7b2a7 100644
--- a/include/services.h
+++ b/include/services.h
@@ -6,8 +6,8 @@
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
*
*/
@@ -157,7 +157,7 @@
# else
# define VA_COPY(DEST, SRC) va_copy(DEST, SRC)
# endif
-#endif
+#endif
#ifdef _AIX
/* Some AIX boxes seem to have bogus includes that don't have these
@@ -386,7 +386,7 @@ struct ircdcapab_ {
uint32 nickchars;
};
-/* tiny struct needed for P10 and other UID servers so we can track
+/* tiny struct needed for P10 and other UID servers so we can track
services UID
*/
struct uid_ {
@@ -457,7 +457,7 @@ struct ModuleData_ {
char *value; /* The Value */
ModuleData *next; /* The next ModuleData record */
};
-
+
/*************************************************************************/
/* Memo info structures. Since both nicknames and channels can have memos,
@@ -664,7 +664,7 @@ struct chaninfo_ {
struct channel_ *c; /* Pointer to channel record (if *
* channel is currently in use) */
-
+
ModuleData *moduleData; /* Module saved data attached to the ChannelInfo */
/* For BotServ */
@@ -823,7 +823,7 @@ typedef enum {
struct server_ {
Server *next, *prev;
-
+
char *name; /* Server name */
uint16 hops; /* Hops between services and server */
char *desc; /* Server description */
@@ -839,7 +839,6 @@ struct server_ {
#define SERVER_JUPED 0x0002
/*************************************************************************/
-
#include "users.h"
@@ -1158,6 +1157,10 @@ typedef struct ircd_proto_ {
int (*ircd_flood_mode_check)(const char *value);
} IRCDProto;
+class IRCDProtoNew {
+ public:
+};
+
typedef struct ircd_modes_ {
int user_invis;
int user_oper;
diff --git a/src/ircd.c b/src/ircd.c
index 6e267c872..1d9c46d96 100644
--- a/src/ircd.c
+++ b/src/ircd.c
@@ -16,10 +16,11 @@
#include "extern.h"
IRCDProto ircdproto;
+IRCDProtoNew *ircdprotonew;
IRCDModes ircd_modes;
/**
- * Globals we want from the protocol file
+ * Globals we want from the protocol file
**/
IRCDVar *ircd;
IRCDCAPAB *ircdcap;
@@ -33,6 +34,11 @@ CMMode cmmodes[128];
char csmodes[128];
int UseTSMODE;
+void pmodule_ircd_proto(IRCDProtoNew *proto)
+{
+ ircdprotonew = proto;
+}
+
/**
* Initiate a protocol struct ready for use
**/
@@ -268,27 +274,49 @@ void anope_cmd_notice2(const char *source, const char *dest, const char *msg)
ircdproto.ircd_cmd_notice2(source, dest, msg);
}
-void anope_cmd_action(const char *source, const char *dest, const char *fmt, ...)
-{
- va_list args;
- char buf[BUFSIZE];
- char actionbuf[BUFSIZE];
- *buf = '\0';
- *actionbuf = '\0';
- if (fmt) {
- va_start(args, fmt);
- vsnprintf(buf, BUFSIZE - 1, fmt, args);
- va_end(args);
- } else {
- return;
- }
- if (!buf) {
- return;
- }
- snprintf(actionbuf, BUFSIZE - 1, "%cACTION %s %c", 1, buf, 1);
- ircdproto.ircd_cmd_privmsg(source, dest, actionbuf);
- }
- void anope_cmd_privmsg(const char *source, const char *dest, const char *fmt, ...)
+void anope_cmd_action(const char *source, const char *dest, const char *fmt, ...)
+{
+
+va_list args;
+
+char buf[BUFSIZE];
+
+char actionbuf[BUFSIZE];
+
+
+*buf = '\0';
+
+*actionbuf = '\0';
+
+
+if (fmt) {
+
+va_start(args, fmt);
+
+vsnprintf(buf, BUFSIZE - 1, fmt, args);
+
+va_end(args);
+
+} else {
+
+return;
+
+}
+
+
+if (!buf) {
+
+return;
+
+}
+
+snprintf(actionbuf, BUFSIZE - 1, "%cACTION %s %c", 1, buf, 1);
+
+ircdproto.ircd_cmd_privmsg(source, dest, actionbuf);
+
+}
+
+void anope_cmd_privmsg(const char *source, const char *dest, const char *fmt, ...)
{
va_list args;
char buf[BUFSIZE];
diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c
index e00fa2a45..201fc4ee9 100644
--- a/src/protocol/bahamut.c
+++ b/src/protocol/bahamut.c
@@ -6,8 +6,8 @@
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
*
*/
@@ -544,7 +544,7 @@ int anope_event_sjoin(char *source, int ac, char **av)
** parv[7] = servicestamp
** parv[8] = IP
** parv[9] = info
-** NICK - change
+** NICK - change
** source = oldnick
** parv[0] = new nickname
** parv[1] = hopcount
@@ -793,7 +793,7 @@ void bahamut_cmd_burst()
}
/* AKILL */
-/* parv[1]=host
+/* parv[1]=host
* parv[2]=user
* parv[3]=length
* parv[4]=akiller
@@ -842,8 +842,8 @@ void bahamut_cmd_svsmode(User * u, int ac, char **av)
/* SQUIT */
/*
- * parv[0] = sender prefix
- * parv[1] = server name
+ * parv[0] = sender prefix
+ * parv[1] = server name
* parv[2] = comment
*/
void bahamut_cmd_squit(char *servname, char *message)
@@ -858,11 +858,11 @@ void bahamut_cmd_pong(char *servname, char *who)
}
/*
- * SVINFO
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
+ * SVINFO
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
* parv[4] = server's idea of UTC time
*/
void bahamut_cmd_svinfo()
@@ -933,10 +933,10 @@ int anope_event_privmsg(char *source, int ac, char **av)
/* EVENT : SVINFO */
/*
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
* parv[4] = server's idea of UTC time
*/
int anope_event_svinfo(char *source, int ac, char **av)
@@ -1517,7 +1517,7 @@ void bahamut_cmd_global_legacy(char *source, char *fmt)
send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
-/*
+/*
1 = valid nick
0 = nick is in valid
*/
@@ -1527,7 +1527,7 @@ int bahamut_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = nick is in chan
*/
@@ -1641,7 +1641,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(bahamut_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1674,6 +1674,7 @@ int AnopeInit(int argc, char **argv)
pmodule_limit_mode(CMODE_l);
moduleAddAnopeCmds();
+ pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();
return MOD_CONT;
diff --git a/src/protocol/bahamut.h b/src/protocol/bahamut.h
index 1b60733a9..9ccafb15d 100644
--- a/src/protocol/bahamut.h
+++ b/src/protocol/bahamut.h
@@ -6,8 +6,8 @@
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
*
*/
@@ -129,3 +129,6 @@ void bahamut_cmd_jupe(char *jserver, char *who, char *reason);
int bahamut_valid_nick(char *nick);
void bahamut_cmd_ctcp(char *source, char *dest, char *buf);
+class BahamutIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/charybdis.c b/src/protocol/charybdis.c
index 23c758324..465dc240d 100644
--- a/src/protocol/charybdis.c
+++ b/src/protocol/charybdis.c
@@ -7,7 +7,7 @@
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
+ * Based on the original code of Services by Andy Church.
*/
#include "services.h"
@@ -691,7 +691,7 @@ int anope_event_topic(char *source, int ac, char **av)
c->topic_time = topic_time;
record_topic(av[0]);
-
+
if (ac > 1 && *av[1])
send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
else
@@ -765,10 +765,10 @@ int anope_event_436(char *source, int ac, char **av)
/* *INDENT-OFF* */
-void moduleAddIRCDMsgs(void)
+void moduleAddIRCDMsgs(void)
{
Message *m;
-
+
updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
if (UseTS6) {
@@ -810,7 +810,7 @@ void moduleAddIRCDMsgs(void)
m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
m = createMessage("421", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("ENCAP", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("ENCAP", anope_event_null); addCoreMessage(IRCD,m);
m = createMessage("SID", anope_event_sid); addCoreMessage(IRCD,m);
m = createMessage("EUID", anope_event_euid); addCoreMessage(IRCD,m);
}
@@ -980,18 +980,18 @@ void charybdis_cmd_svsinfo()
/* CAPAB */
/*
QS - Can handle quit storm removal
- EX - Can do channel +e exemptions
+ EX - Can do channel +e exemptions
CHW - Can do channel wall @#
- LL - Can do lazy links
- IE - Can do invite exceptions
+ LL - Can do lazy links
+ IE - Can do invite exceptions
EOB - Can do EOB message
- KLN - Can do KLINE message
- GLN - Can do GLINE message
- HUB - This server is a HUB
+ KLN - Can do KLINE message
+ GLN - Can do GLINE message
+ HUB - This server is a HUB
UID - Can do UIDs
ZIP - Can do ZIPlinks
- ENC - Can do ENCrypted links
- KNOCK - supports KNOCK
+ ENC - Can do ENCrypted links
+ KNOCK - supports KNOCK
TBURST - supports TBURST
PARA - supports invite broadcasting for +p
ENCAP - supports message encapsulation
@@ -1812,7 +1812,7 @@ void charybdis_cmd_jupe(char *jserver, char *who, char *reason)
new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
}
-/*
+/*
1 = valid nick
0 = nick is in valid
*/
@@ -1824,7 +1824,7 @@ int charybdis_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is invalid
*/
@@ -1949,7 +1949,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(charybdis_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1982,6 +1982,7 @@ int AnopeInit(int argc, char **argv)
pmodule_limit_mode(CMODE_l);
moduleAddAnopeCmds();
+ pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();
hk = createEventHook(EVENT_NICK_IDENTIFY, charybdis_send_account);
diff --git a/src/protocol/charybdis.h b/src/protocol/charybdis.h
index 4208c4d43..5eae1e275 100644
--- a/src/protocol/charybdis.h
+++ b/src/protocol/charybdis.h
@@ -6,8 +6,8 @@
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
*
*/
@@ -117,4 +117,6 @@ void charybdis_cmd_jupe(char *jserver, char *who, char *reason);
int charybdis_valid_nick(char *nick);
void charybdis_cmd_ctcp(char *source, char *dest, char *buf);
-
+class CharybdisProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/dreamforge.c b/src/protocol/dreamforge.c
index 3809f3bd7..3e0bf958d 100644
--- a/src/protocol/dreamforge.c
+++ b/src/protocol/dreamforge.c
@@ -6,8 +6,8 @@
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
*
*/
@@ -1228,7 +1228,7 @@ void dreamforge_cmd_global_legacy(char *source, char *fmt)
send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
-/*
+/*
1 = valid nick
0 = nick is in valid
*/
@@ -1238,7 +1238,7 @@ int dreamforge_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1346,7 +1346,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(dreamforge_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1378,6 +1378,7 @@ int AnopeInit(int argc, char **argv)
pmodule_limit_mode(CMODE_l);
moduleAddAnopeCmds();
+ pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();
return MOD_CONT;
diff --git a/src/protocol/dreamforge.h b/src/protocol/dreamforge.h
index 057ea3b91..fdd9035fc 100644
--- a/src/protocol/dreamforge.h
+++ b/src/protocol/dreamforge.h
@@ -6,12 +6,12 @@
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
*
*/
-#define UMODE_a 0x00000001 /* Services Admin */
+#define UMODE_a 0x00000001 /* Services Admin */
#define UMODE_h 0x00000002 /* Help system operator */
#define UMODE_i 0x00000004 /* makes user invisible */
#define UMODE_o 0x00000008 /* Operator */
@@ -109,3 +109,6 @@ void dreamforge_cmd_jupe(char *jserver, char *who, char *reason);
int dreamforge_valid_nick(char *nick);
void dreamforge_cmd_ctcp(char *source, char *dest, char *buf);
+class DreamForgeProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/hybrid.c b/src/protocol/hybrid.c
index 454913517..a4102ccab 100644
--- a/src/protocol/hybrid.c
+++ b/src/protocol/hybrid.c
@@ -6,8 +6,8 @@
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
*
*/
@@ -658,7 +658,7 @@ void hybrid_cmd_sqline(char *mask, char *reason)
if (!mask || !reason) {
return;
}
-
+
send_cmd(ServerName, "RESV * %s :%s", mask, reason);
}
void hybrid_cmd_unsgline(char *mask)
@@ -666,7 +666,7 @@ void hybrid_cmd_unsgline(char *mask)
if (!mask) {
return;
}
-
+
send_cmd(ServerName, "UNXLINE * %s", mask);
}
@@ -694,7 +694,7 @@ void hybrid_cmd_sgline(char *mask, char *reason)
if (!mask || !reason) {
return;
}
-
+
send_cmd(ServerName, "XLINE * %s 0 :%s", mask, reason);
}
@@ -725,7 +725,7 @@ void hybrid_cmd_unsqline(char *user)
if (!user) {
return;
}
-
+
send_cmd(ServerName, "UNRESV * %s", user);
}
@@ -786,20 +786,20 @@ void hybrid_cmd_svinfo()
/* CAPAB */
/*
QS - Can handle quit storm removal
- EX - Can do channel +e exemptions
+ EX - Can do channel +e exemptions
CHW - Can do channel wall @#
- LL - Can do lazy links
- IE - Can do invite exceptions
+ LL - Can do lazy links
+ IE - Can do invite exceptions
EOB - Can do EOB message
- KLN - Can do KLINE message
- GLN - Can do GLINE message
+ KLN - Can do KLINE message
+ GLN - Can do GLINE message
HOPS - can do half ops (+h)
- HUB - This server is a HUB
- AOPS - Can do anon ops (+a)
+ HUB - This server is a HUB
+ AOPS - Can do anon ops (+a)
UID - Can do UIDs
ZIP - Can do ZIPlinks
- ENC - Can do ENCrypted links
- KNOCK - supports KNOCK
+ ENC - Can do ENCrypted links
+ KNOCK - supports KNOCK
TBURST - supports TBURST
PARA - supports invite broadcasting for +p
ENCAP - ?
@@ -1234,10 +1234,10 @@ int anope_event_capab(char *source, int ac, char **av)
int argc;
char **argv;
char *str;
-
+
if (ac < 1)
return MOD_CONT;
-
+
/* We get the params as one arg, we should split it for capab_parse */
argv = scalloc(argvsize, sizeof(char *));
argc = 0;
@@ -1249,15 +1249,15 @@ int anope_event_capab(char *source, int ac, char **av)
argv[argc] = str;
argc++;
}
-
+
capab_parse(argc, argv);
-
+
/* Free our built ac/av */
for (argvsize = 0; argvsize < argc; argvsize++) {
free(argv[argvsize]);
}
free(argv);
-
+
return MOD_CONT;
}
@@ -1417,7 +1417,7 @@ void hybrid_cmd_jupe(char *jserver, char *who, char *reason)
new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
}
-/*
+/*
1 = valid nick
0 = nick is in valid
*/
@@ -1427,7 +1427,7 @@ int hybrid_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1535,7 +1535,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(hybrid_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1567,6 +1567,7 @@ int AnopeInit(int argc, char **argv)
pmodule_limit_mode(CMODE_l);
moduleAddAnopeCmds();
+ pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();
return MOD_CONT;
diff --git a/src/protocol/hybrid.h b/src/protocol/hybrid.h
index b4437888c..7e116ed3d 100644
--- a/src/protocol/hybrid.h
+++ b/src/protocol/hybrid.h
@@ -6,8 +6,8 @@
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
*
*/
@@ -113,3 +113,7 @@ int hybrid_flood_mode_check(char *value);
void hybrid_cmd_jupe(char *jserver, char *who, char *reason);
int hybrid_valid_nick(char *nick);
void hybrid_cmd_ctcp(char *source, char *dest, char *buf);
+
+class HybridIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/inspircd10.c b/src/protocol/inspircd10.c
index 30ced466d..030cd6207 100644
--- a/src/protocol/inspircd10.c
+++ b/src/protocol/inspircd10.c
@@ -7,8 +7,8 @@
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
*
*/
@@ -1154,12 +1154,12 @@ int anope_event_topic(char *source, int ac, char **av)
c->topic_time = topic_time;
record_topic(av[0]);
-
+
if (ac > 1 && *av[1])
send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
else
send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
-
+
return MOD_CONT;
}
@@ -1675,7 +1675,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(inspircd_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1707,6 +1707,7 @@ int AnopeInit(int argc, char **argv)
pmodule_limit_mode(CMODE_l);
moduleAddAnopeCmds();
+ pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();
return MOD_CONT;
diff --git a/src/protocol/inspircd10.h b/src/protocol/inspircd10.h
index d23876029..6a992efaf 100644
--- a/src/protocol/inspircd10.h
+++ b/src/protocol/inspircd10.h
@@ -6,8 +6,8 @@
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
*
*/
@@ -131,3 +131,7 @@ int anope_event_sapart(char *source, int ac, char **av);
int anope_event_version(char *source, int ac, char **av);
int anope_event_opertype(char *source, int ac, char **av);
int anope_event_idle(char* source, int ac, char **av);
+
+class InspIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c
index eb2b3c4a2..6416521b5 100644
--- a/src/protocol/inspircd11.c
+++ b/src/protocol/inspircd11.c
@@ -7,8 +7,8 @@
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
*
*/
@@ -383,7 +383,7 @@ CUMode myCumodes[128] = {
static int has_servicesmod = 0;
static int has_globopsmod = 0;
-/* These are sanity checks to insure we are supported.
+/* These are sanity checks to insure we are supported.
The ircd tends to /squit us if we issue unsupported cmds.
- katsklaw */
static int has_svsholdmod = 0;
@@ -623,7 +623,7 @@ void inspircd_cmd_mode(char *source, char *dest, char *buf)
if (!buf) {
return;
}
-
+
c = findchan(dest);
send_cmd(source ? source : s_OperServ, "FMODE %s %u %s", dest, (unsigned int)((c) ? c->creation_time : time(NULL)), buf);
}
@@ -692,7 +692,7 @@ int anope_event_fmode(char *source, int ac, char **av)
/* Got FMODE for a non-existing channel */
return MOD_CONT;
}
-
+
/* TS's are equal now, so we can proceed with parsing */
n = o = 0;
while (n < ac) {
@@ -1244,13 +1244,13 @@ int anope_event_rsquit(char *source, int ac, char **av)
{
if (ac < 1 || ac > 3)
return MOD_CONT;
-
+
/* Horrible workaround to an insp bug (#) in how RSQUITs are sent - mark */
if (ac > 1 && strcmp(ServerName, av[0]) == 0)
do_squit(source, ac - 1, av + 1);
else
do_squit(source, ac, av);
-
+
return MOD_CONT;
}
@@ -1427,10 +1427,10 @@ int anope_event_nick(char *source, int ac, char **av)
if (ac == 8) {
int svid = 0;
int ts = strtoul(av[0], NULL, 10);
-
+
if (strchr(av[5], 'r') != NULL)
svid = ts;
-
+
inet_aton(av[6], &addy);
user = do_nick("", av[1], /* nick */
av[4], /* username */
@@ -1524,1