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,13 +1524,13 @@ int anope_event_capab(char *source, int ac, char **av)
if (strstr(av[1], "m_services.so")) {
has_servicesmod = 1;
}
- if (strstr(av[1], "m_svshold.so")) {
+ if (strstr(av[1], "m_svshold.so")) {
has_svsholdmod = 1;
}
if (strstr(av[1], "m_chghost.so")) {
has_chghostmod = 1;
}
- if (strstr(av[1], "m_chgident.so")) {
+ if (strstr(av[1], "m_chgident.so")) {
has_chgidentmod = 1;
}
if (strstr(av[1], "m_messageflood.so")) {
@@ -1566,9 +1566,9 @@ int anope_event_capab(char *source, int ac, char **av)
if (!has_chgidentmod) {
anope_cmd_global(s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
}
- if (has_messagefloodmod) {
+ if (has_messagefloodmod) {
cbmi = myCbmodeinfos;
-
+
/* Find 'f' in myCbmodeinfos and add the relevant bits to myCbmodes and myCbmodeinfos
* to enable +f support if found. This is needed because we're really not set up to
* handle modular ircds which can have modes enabled/disabled as they please :( - mark
@@ -1579,15 +1579,15 @@ int anope_event_capab(char *source, int ac, char **av)
if (cbmi) {
cbmi->getvalue = get_flood;
cbmi->csgetvalue = cs_get_flood;
-
+
myCbmodes['f'].flag = CMODE_f;
myCbmodes['f'].flags = 0;
myCbmodes['f'].setvalue = set_flood;
myCbmodes['f'].cssetvalue = cs_set_flood;
-
+
pmodule_ircd_cbmodeinfos(myCbmodeinfos);
pmodule_ircd_cbmodes(myCbmodes);
-
+
ircd->fmode = 1;
}
else {
@@ -1612,7 +1612,7 @@ int anope_event_capab(char *source, int ac, char **av)
if (has_banexceptionmod || has_inviteexceptionmod) {
pmodule_ircd_cmmodes(myCmmodes);
}
-
+
/* Generate a fake capabs parsing call so things like NOQUIT work
* fine. It's ugly, but it works....
*/
@@ -1888,7 +1888,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(inspircd_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1921,6 +1921,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/inspircd11.h b/src/protocol/inspircd11.h
index d079b2c97..e12b3f9f5 100755
--- a/src/protocol/inspircd11.h
+++ b/src/protocol/inspircd11.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.
+ *
*
*/
@@ -132,3 +132,7 @@ 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);
int anope_event_rsquit(char *source, int ac, char **av);
+
+class InspIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/plexus2.c b/src/protocol/plexus2.c
index 0a91194f4..f3d250ab5 100644
--- a/src/protocol/plexus2.c
+++ b/src/protocol/plexus2.c
@@ -206,7 +206,7 @@ plexus_set_umode (User * user, int ac, char **av)
}
}
-/*
+/*
* Local valid_op, and valid_halfop overrides.
* These are nessecary due to the way hybrid-based ircds handle halfops.
* hybrid-based ircds treat a -o as a -h as well. So if a user is set -o,
@@ -667,12 +667,12 @@ 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;
}
@@ -930,20 +930,20 @@ plexus_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 - ?
@@ -1714,7 +1714,7 @@ plexus_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
*/
@@ -1725,7 +1725,7 @@ plexus_valid_nick (char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1839,7 +1839,7 @@ moduleAddAnopeCmds ()
pmodule_set_umode (plexus_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int
@@ -1872,6 +1872,7 @@ 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/plexus2.h b/src/protocol/plexus2.h
index 366909b2b..20f74770b 100644
--- a/src/protocol/plexus2.h
+++ b/src/protocol/plexus2.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.
+ *
*
*/
@@ -123,4 +123,6 @@ void plexus_cmd_jupe(char *jserver, char *who, char *reason);
int plexus_valid_nick(char *nick);
void plexus_cmd_ctcp(char *source, char *dest, char *buf);
-
+class PleXusIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/plexus3.c b/src/protocol/plexus3.c
index 0fe8a74c4..1f9fdb0a3 100644
--- a/src/protocol/plexus3.c
+++ b/src/protocol/plexus3.c
@@ -610,12 +610,12 @@ 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;
}
@@ -906,20 +906,20 @@ plexus_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 - supports encapsulization of protocol messages
@@ -1570,7 +1570,7 @@ void
plexus_cmd_svid_umode3 (User * u, char *ts)
{
char modes[512];
-
+
strlcpy(modes, "+r", sizeof(modes));
if(ircd->rootmodeonid && is_services_root(u)) {
@@ -1691,7 +1691,7 @@ plexus_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
*/
@@ -1702,7 +1702,7 @@ plexus_valid_nick (char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1816,7 +1816,7 @@ moduleAddAnopeCmds ()
pmodule_set_umode (plexus_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int
@@ -1849,6 +1849,7 @@ 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/plexus3.h b/src/protocol/plexus3.h
index eedd4a572..07d10ad9d 100644
--- a/src/protocol/plexus3.h
+++ b/src/protocol/plexus3.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.
+ *
*
*/
@@ -110,4 +110,6 @@ void plexus_cmd_jupe(char *jserver, char *who, char *reason);
int plexus_valid_nick(char *nick);
void plexus_cmd_ctcp(char *source, char *dest, char *buf);
-
+class PleXusIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/ptlink.c b/src/protocol/ptlink.c
index 9e6eb08b1..f17331976 100644
--- a/src/protocol/ptlink.c
+++ b/src/protocol/ptlink.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.
+ *
*
*/
@@ -396,7 +396,7 @@ void ptlink_cmd_bot_chan_mode(char *nick, char *chan)
parv[0] = sender
parv[1] = channel TS (channel creation time)
parv[2] = channel
- parv[3] = modes + n arguments (key and/or limit)
+ parv[3] = modes + n arguments (key and/or limit)
... [n] = if(key and/or limit) mode arguments
parv[4+n] = flags+nick list (all in one parameter)
NOTE: ignore channel modes if we already have the channel with a gr
@@ -474,7 +474,7 @@ int anope_event_newmask(char *source, int ac, char **av)
/*
NICK %s %d %lu %s %s %s %s %s :%s
parv[0] = nickname
- parv[1] = hopcount
+ parv[1] = hopcount
parv[2] = nick TS (nick introduction time)
parv[3] = umodes
parv[4] = username
@@ -512,7 +512,7 @@ int anope_event_nick(char *source, int ac, char **av)
/*
:%s SERVER %s %d %s :%s
- parv[0] = server from where the server was introduced to us
+ parv[0] = server from where the server was introduced to us
parv[1] = server name
parv[2] = hop count (1 wen are directly connected)
parv[3] = server version
@@ -663,7 +663,7 @@ int anope_event_capab(char *source, int ac, char **av)
/*
:%s SQLINE %s :%s
- parv[0] = sender
+ parv[0] = sender
parv[1] = sqlined nick/mask
parv[2] = reason
*/
@@ -714,7 +714,7 @@ void anope_topic(char *whosets, char *chan, char *whosetit, char *topic,
/*
:%s UNSQLINE %s
- parv[0] = sender
+ parv[0] = sender
parv[1] = sqlined nick/mask
*/
void ptlink_cmd_unsqline(char *user)
@@ -733,7 +733,7 @@ void ptlink_cmd_join(char *user, char *channel, time_t chantime)
parv[0] = sender (server if on network synchronization)
parv[1] = glined usert@host mask
parv[2] = gline duration time (seconds)
- parv[3] = who added the gline
+ parv[3] = who added the gline
parv[4] = reason
*/
void ptlink_cmd_akill(char *user, char *host, char *who, time_t when,
@@ -837,8 +837,8 @@ void ptlink_cmd_svsinfo()
/*
PASS %s :TS
- parv[1] = connection password
- (TS indicates this is server uses TS protocol and SVINFO will be sent
+ parv[1] = connection password
+ (TS indicates this is server uses TS protocol and SVINFO will be sent
for protocol compatibility checking)
*/
void ptlink_cmd_pass(char *pass)
@@ -848,7 +848,7 @@ void ptlink_cmd_pass(char *pass)
/*
CAPAB :%s
- parv[1] = capability list
+ parv[1] = capability list
*/
void ptlink_cmd_capab()
{
@@ -1190,7 +1190,7 @@ void ptlink_cmd_mode(char *source, char *dest, char *buf)
/*
NICK %s %d %lu %s %s %s %s %s :%s
parv[1] = nickname
- parv[2] = hopcount
+ parv[2] = hopcount
parv[3] = nick TS (nick introduction time)
parv[4] = umodes
parv[5] = username
@@ -1413,7 +1413,7 @@ void ptlink_cmd_release_svshold(char *nick)
/*
:%s UNZLINE %s
- parv[0] = sender
+ parv[0] = sender
parv[1] = zlined host
*/
void ptlink_cmd_unszline(char *mask)
@@ -1423,7 +1423,7 @@ void ptlink_cmd_unszline(char *mask)
/*
:%s ZLINE %s :%s
- parv[0] = sender
+ parv[0] = sender
parv[1] = zlined host
parv[2] = time
parv[3] = reason
@@ -1434,9 +1434,9 @@ void ptlink_cmd_szline(char *mask, char *reason, char *whom)
(long int) time(NULL) + 86400 * 2, reason);
}
-/*
+/*
:%s UNSXLINE %s
- parv[0] = sender
+ parv[0] = sender
parv[1] = info ban mask
*/
void ptlink_cmd_unsgline(char *mask)
@@ -1547,7 +1547,7 @@ void ptlink_cmd_chg_nick(char *oldnick, char *newnick)
:%s SVSJOIN %s :%s
parv[0] = sender (services client)
parv[1] = target client nick
- parv[2] = channels list
+ parv[2] = channels list
:OperServ SVSJOIN Trystan #Admin
*/
void ptlink_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
@@ -1559,7 +1559,7 @@ void ptlink_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
:%s SVSPART %s :%s
parv[0] = sender (services client)
parv[1] = target client nick
- parv[2] = channels list
+ parv[2] = channels list
e.g.: :ChanServ SVSPART mynick 4163321 #Chan1,#Chan2
*/
void ptlink_cmd_svspart(char *source, char *nick, char *chan)
@@ -1640,7 +1640,7 @@ void ptlink_cmd_global_legacy(char *source, char *fmt)
send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
-/*
+/*
1 = valid nick
0 = nick is in valid
*/
@@ -1650,7 +1650,7 @@ int ptlink_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1758,7 +1758,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(ptlink_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1792,6 +1792,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/ptlink.h b/src/protocol/ptlink.h
index a7c1d2c3f..b09218fca 100644
--- a/src/protocol/ptlink.h
+++ b/src/protocol/ptlink.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.
+ *
*
*/
@@ -62,7 +62,7 @@
/*
The following variables are set to define the TS protocol version
- that we support.
+ that we support.
PTLink 6.14 to 6.17 TS CURRENT is 6 and MIN is 3
PTlink 6.18 TS CURRENT is 9 and MIN is 3
@@ -149,4 +149,6 @@ void ptlink_cmd_jupe(char *jserver, char *who, char *reason);
int ptlink_valid_nick(char *nick);
void ptlink_cmd_ctcp(char *source, char *dest, char *buf);
-
+class PTlinkProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/rageircd.c b/src/protocol/rageircd.c
index 94fc7824e..b9075b2cb 100644
--- a/src/protocol/rageircd.c
+++ b/src/protocol/rageircd.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.
+ *
*
*/
@@ -458,7 +458,7 @@ int anope_event_vhost(char *source, int ac, char **av)
/*
** SNICK
-** source = NULL
+** source = NULL
** parv[0] = nickname Trystan
** parv[1] = timestamp 1090113640
** parv[2] = hops 1
@@ -500,7 +500,7 @@ int anope_event_436(char *source, int ac, char **av)
/* *INDENT-OFF* */
void moduleAddIRCDMsgs(void) {
Message *m;
-
+
updateProtectDetails("ADMIN","ADMINME","admin","deadmin","AUTOADMIN","+a","-a");
m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
@@ -1430,7 +1430,7 @@ int anope_event_pass(char *source, int ac, char **av)
* parv[3] = standalone or connected to non-TS (unused)
* parv[4] = UTC time
* parv[5] = ircd codename
- * parv[6] = masking keys
+ * parv[6] = masking keys
*/
int anope_event_svinfo(char *source, int ac, char **av)
{
@@ -1520,7 +1520,7 @@ void rageircd_cmd_global_legacy(char *source, char *fmt)
send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
-/*
+/*
1 = valid nick
0 = nick is in valid
*/
@@ -1530,7 +1530,7 @@ int rageircd_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1638,7 +1638,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(rageircd_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1671,6 +1671,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/rageircd.h b/src/protocol/rageircd.h
index c997a8f1c..1e4b5d806 100644
--- a/src/protocol/rageircd.h
+++ b/src/protocol/rageircd.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.
+ *
*
*/
@@ -111,3 +111,7 @@ int rageircd_flood_mode_check(char *value);
void rageircd_cmd_jupe(char *jserver, char *who, char *reason);
int rageircd_valid_nick(char *nick);
void rageircd_cmd_ctcp(char *source, char *dest, char *buf);
+
+class RageIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c
index d8c33b4a3..9fc22d3bb 100644
--- a/src/protocol/ratbox.c
+++ b/src/protocol/ratbox.c
@@ -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.
+ *
*
*/
@@ -645,7 +645,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
@@ -712,10 +712,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) {
@@ -758,7 +758,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);
}
@@ -925,18 +925,18 @@ void ratbox_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 - ?
@@ -1724,7 +1724,7 @@ void ratbox_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
*/
@@ -1736,7 +1736,7 @@ int ratbox_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1844,7 +1844,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(ratbox_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1876,6 +1876,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/ratbox.h b/src/protocol/ratbox.h
index 4088bd7be..1605a63c6 100644
--- a/src/protocol/ratbox.h
+++ b/src/protocol/ratbox.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.
+ *
*
*/
@@ -116,4 +116,6 @@ void ratbox_cmd_jupe(char *jserver, char *who, char *reason);
int ratbox_valid_nick(char *nick);
void ratbox_cmd_ctcp(char *source, char *dest, char *buf);
-
+class RatboxProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/shadowircd.c b/src/protocol/shadowircd.c
index 0061a538b..848870771 100644
--- a/src/protocol/shadowircd.c
+++ b/src/protocol/shadowircd.c
@@ -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.
- *
- * Provided by the ShadowIRCd development group. See
+ * Based on the original code of Services by Andy Church.
+ *
+ * Provided by the ShadowIRCd development group. See
* http://www.shadowircd.net for details.
*/
@@ -608,10 +608,10 @@ int anope_event_nick(char *source, int ac, char **av)
anope_set_umode(user, 1, &av[3]);
}
} else if (ac == 8) {
- /* Changed use of s->name to av[6], as s will be NULL
+ /* Changed use of s->name to av[6], as s will be NULL
* if i can believe the above comments, this should be fine
* if anyone from shadowircd see's this, and its wrong, let
- * me know? :)
+ * me know? :)
*/
user = do_nick(source, av[0], av[4], av[5], av[6], av[7],
strtoul(av[2], NULL, 10), 0, 0, NULL, NULL);
@@ -683,7 +683,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
@@ -734,15 +734,15 @@ int anope_event_tburst(char *source, int ac, char **av)
c->topic_time = topic_time;
record_topic(av[0]);
-
+
if (ac > 1 && *av[3])
send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[3]);
else
send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
-
+
if (setter)
free(setter);
-
+
return MOD_CONT;
}
@@ -757,10 +757,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","+a","-a");
TS6SID = sstrdup(Numeric);
@@ -802,7 +802,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("EOB", anope_event_eos); addCoreMessage(IRCD,m);
m = createMessage("TSSYNC", anope_event_null); addCoreMessage(IRCD,m);
@@ -991,7 +991,7 @@ void shadowircd_cmd_bot_nick(char *nick, char *user, char *host,
char *real, char *modes)
{
char *uidbuf = ts6_uid_retrieve();
-
+
EnforceQlinedNick(nick, NULL);
send_cmd(TS6SID, "UID %s 1 %ld %s %s %s 0.0.0.0 %s %s :%s", nick,
(long int) time(NULL), modes, user, host, uidbuf, host,
@@ -1353,7 +1353,7 @@ void shadowircd_cmd_tmode(char *source, char *dest, char *buf)
void shadowircd_cmd_nick(char *nick, char *name, char *mode)
{
char *uidbuf = ts6_uid_retrieve();
-
+
EnforceQlinedNick(nick, NULL);
send_cmd(TS6SID, "UID %s 1 %ld %s %s %s 0.0.0.0 %s %s :%s", nick,
(long int) time(NULL), mode, ServiceUser, ServiceHost,
@@ -1676,7 +1676,7 @@ void shadowircd_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
*/
@@ -1688,7 +1688,7 @@ int shadowircd_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1827,6 +1827,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/shadowircd.h b/src/protocol/shadowircd.h
index 67f5188fd..7d63e8dcb 100644
--- a/src/protocol/shadowircd.h
+++ b/src/protocol/shadowircd.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.
+ *
*
*/
@@ -140,3 +140,7 @@ int shadowircd_flood_mode_check(char *value);
void shadowircd_cmd_jupe(char *jserver, char *who, char *reason);
int shadowircd_valid_nick(char *nick);
void shadowircd_cmd_ctcp(char *source, char *dest, char *buf);
+
+class ShadowIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/solidircd.c b/src/protocol/solidircd.c
index b0f948794..e278b9f96 100644
--- a/src/protocol/solidircd.c
+++ b/src/protocol/solidircd.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.
+ *
*
*/
@@ -553,7 +553,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
@@ -640,7 +640,7 @@ int anope_event_436(char *source, int ac, char **av)
/* *INDENT-OFF* */
void moduleAddIRCDMsgs(void) {
Message *m;
-
+
updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
@@ -812,7 +812,7 @@ void solidircd_cmd_join(char *user, char *channel, time_t chantime)
}
/* AKILL */
-/* parv[1]=host
+/* parv[1]=host
* parv[2]=user
* parv[3]=length
* parv[4]=akiller
@@ -861,8 +861,8 @@ void solidircd_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 solidircd_cmd_squit(char *servname, char *message)
@@ -883,11 +883,11 @@ void solidircd_cmd_burst()
/*
- * 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 solidircd_cmd_svinfo()
@@ -956,10 +956,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)
@@ -1553,7 +1553,7 @@ void solidircd_cmd_global_legacy(char *source, char *fmt)
send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
-/*
+/*
1 = valid nick
0 = nick is in valid
*/
@@ -1563,7 +1563,7 @@ int solidircd_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1671,7 +1671,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(solidircd_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1704,6 +1704,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/solidircd.h b/src/protocol/solidircd.h
index 9bf5d3b02..78e4b9ec7 100644
--- a/src/protocol/solidircd.h
+++ b/src/protocol/solidircd.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.
+ *
*
*/
@@ -135,3 +135,7 @@ int solidircd_flood_mode_check(char *value);
void solidircd_cmd_jupe(char *jserver, char *who, char *reason);
int solidircd_valid_nick(char *nick);
void solidircd_cmd_ctcp(char *source, char *dest, char *buf);
+
+class SolidIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/ultimate2.c b/src/protocol/ultimate2.c
index 2e6125861..1ac7207cd 100644
--- a/src/protocol/ultimate2.c
+++ b/src/protocol/ultimate2.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.
+ *
*
*/
@@ -1578,7 +1578,7 @@ void ultimate2_cmd_global_legacy(char *source, char *fmt)
send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
-/*
+/*
1 = valid nick
0 = nick is in valid
*/
@@ -1588,7 +1588,7 @@ int ultiamte2_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1696,7 +1696,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(ultiamte2_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1728,6 +1728,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/ultimate2.h b/src/protocol/ultimate2.h
index 221e69911..40251ba6d 100644
--- a/src/protocol/ultimate2.h
+++ b/src/protocol/ultimate2.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 ultimate2_cmd_jupe(char *jserver, char *who, char *reason);
int ultimate2_valid_nick(char *nick);
void ultimate2_cmd_ctcp(char *source, char *dest, char *buf);
-
+class UltimateIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/ultimate3.c b/src/protocol/ultimate3.c
index 16186481a..398a973e9 100644
--- a/src/protocol/ultimate3.c
+++ b/src/protocol/ultimate3.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.
+ *
*
*/
@@ -512,7 +512,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
@@ -560,7 +560,7 @@ int anope_event_capab(char *source, int ac, char **av)
/*
** CLIENT
-** source = NULL
+** source = NULL
** parv[0] = nickname Trystan
** parv[1] = hopcount 1
** parv[2] = timestamp 1090083810
@@ -570,7 +570,7 @@ int anope_event_capab(char *source, int ac, char **av)
** parv[6] = hostname c-24-2-101-227.client.comcast.net
** parv[7] = vhost 3223f75b.2b32ee69.client.comcast.net
** parv[8] = server WhiteRose.No.Eu.Shadow-Realm.org
-** parv[9] = svid 0
+** parv[9] = svid 0
** parv[10] = ip 402810339
** parv[11] = info Dreams are answers to questions not yet asked
*/
@@ -1427,11 +1427,11 @@ void ultimate3_cmd_svsnick(char *source, char *guest, time_t when)
/* Functions that use serval cmd functions */
/*
- * 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 ultimate3_cmd_svinfo()
@@ -1661,7 +1661,7 @@ void ultimate3_cmd_global_legacy(char *source, char *fmt)
send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
-/*
+/*
1 = valid nick
0 = nick is in valid
*/
@@ -1671,7 +1671,7 @@ int ultiamte3_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1779,7 +1779,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(ultimate3_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1812,6 +1812,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/ultimate3.h b/src/protocol/ultimate3.h
index cdff880c1..de53c83c6 100644
--- a/src/protocol/ultimate3.h
+++ b/src/protocol/ultimate3.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.
+ *
*
*/
@@ -122,4 +122,6 @@ void ultimate3_cmd_jupe(char *jserver, char *who, char *reason);
int ultimate3_valid_nick(char *nick);
void ultimate3_cmd_ctcp(char *source, char *dest, char *buf);
-
+class UltimateIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/unreal31.c b/src/protocol/unreal31.c
index 08781ca0f..77fcab38a 100644
--- a/src/protocol/unreal31.c
+++ b/src/protocol/unreal31.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.
+ *
*
*/
@@ -691,7 +691,7 @@ void unreal_cmd_protoctl()
{
/*
See Unreal's protoctl.txt for reference
- VHP - Send hostnames in NICKv2 even if not sethosted
+ VHP - Send hostnames in NICKv2 even if not sethosted
*/
send_cmd(NULL, "PROTOCTL NICKv2 VHP");
}
@@ -1191,10 +1191,10 @@ int anope_event_nick(char *source, int ac, char **av)
if (ac != 2) {
if (ac == 7) {
- /*
+ /*
<codemastr> that was a bug that is now fixed in 3.2.1
<codemastr> in some instances it would use the non-nickv2 format
- <codemastr> it's sent when a nick collision occurs
+ <codemastr> it's sent when a nick collision occurs
- so we have to leave it around for now -TSL
*/
do_nick(source, av[0], av[3], av[4], av[5], av[6],
@@ -1435,7 +1435,7 @@ void unreal_cmd_global_legacy(char *source, char *fmt)
send_token("GLOBOPS", "]"), fmt);
}
-/*
+/*
1 = valid nick
0 = nick is in valid
*/
@@ -1554,7 +1554,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(unreal_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1586,6 +1586,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/unreal31.h b/src/protocol/unreal31.h
index 21ace9b86..50797980f 100644
--- a/src/protocol/unreal31.h
+++ b/src/protocol/unreal31.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.
+ *
*
*/
@@ -122,3 +122,6 @@ void unreal_cmd_jupe(char *jserver, char *who, char *reason);
int unreal_valid_nick(char *nick);
void unreal_cmd_ctcp(char *source, char *dest, char *buf);
+class UnrealIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c
index 39ec97db4..80378acc5 100644
--- a/src/protocol/unreal32.c
+++ b/src/protocol/unreal32.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.
+ *
*
*/
@@ -737,7 +737,7 @@ void unreal_cmd_quit(char *source, char *buf)
/* PROTOCTL */
/*
NICKv2 = Nick Version 2
- VHP = Sends hidden host
+ VHP = Sends hidden host
UMODE2 = sends UMODE2 on user modes
NICKIP = Sends IP on NICK
TOKEN = Use tokens to talk
@@ -1005,7 +1005,7 @@ void unreal_cmd_global_legacy(char *source, char *fmt)
** parv[0] = sender
** parv[1] = nickmask
** parv[2] = reason
-**
+**
** - Unreal will translate this to TKL for us
**
*/
@@ -1151,8 +1151,8 @@ int anope_event_netinfo(char *source, int ac, char **av)
* parv[ 6]: expire_at expire_at (0) expire_at (0) expire_at
* parv[ 7]: set_at set_at set_at set_at
* parv[ 8]: reason regex tkl duration reason
- * parv[ 9]: tkl reason [A]
- * parv[10]: regex
+ * parv[ 9]: tkl reason [A]
+ * parv[10]: regex
*
*/
int anope_event_tkl(char *source, int ac, char **av)
@@ -1202,7 +1202,7 @@ int anope_event_away(char *source, int ac, char **av)
** parv[0] = sender prefix
** parv[1] = topic text
**
-** For servers using TS:
+** For servers using TS:
** parv[0] = sender prefix
** parv[1] = channel name
** parv[2] = topic nickname
@@ -1417,8 +1417,8 @@ int anope_event_sethost(char *source, int ac, char **av)
** if NICKIP:
** parv[9] = ip
** parv[10] = info
-**
-** NICK - change
+**
+** NICK - change
** source = oldnick
** parv[0] = new nickname
** parv[1] = hopcount
@@ -1434,10 +1434,10 @@ int anope_event_nick(char *source, int ac, char **av)
if (ac != 2) {
if (ac == 7) {
- /*
+ /*
<codemastr> that was a bug that is now fixed in 3.2.1
<codemastr> in some instances it would use the non-nickv2 format
- <codemastr> it's sent when a nick collision occurs
+ <codemastr> it's sent when a nick collision occurs
- so we have to leave it around for now -TSL
*/
do_nick(source, av[0], av[3], av[4], av[5], av[6],
@@ -1819,7 +1819,7 @@ void unreal_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
*/
@@ -2194,7 +2194,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(unreal_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -2226,6 +2226,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/unreal32.h b/src/protocol/unreal32.h
index 4f8a9adf6..2eb0f9b4a 100644
--- a/src/protocol/unreal32.h
+++ b/src/protocol/unreal32.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.
+ *
*
*/
@@ -151,3 +151,6 @@ void unreal_cmd_jupe(char *jserver, char *who, char *reason);
int unreal_valid_nick(char *nick);
void unreal_cmd_ctcp(char *source, char *dest, char *buf);
+class UnrealIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;
diff --git a/src/protocol/viagra.c b/src/protocol/viagra.c
index 8638204b7..2615c57b8 100644
--- a/src/protocol/viagra.c
+++ b/src/protocol/viagra.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.
+ *
* $Id$
*
*/
@@ -674,7 +674,7 @@ void moduleAddIRCDMsgs(void) {
Message *m;
updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a");
-
+
m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
m = createMessage("402", anope_event_null); addCoreMessage(IRCD,m);
m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
@@ -1560,7 +1560,7 @@ void viagra_cmd_global_legacy(char *source, char *fmt)
send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
-/*
+/*
1 = valid nick
0 = nick is in valid
*/
@@ -1570,7 +1570,7 @@ int viagra_valid_nick(char *nick)
return 1;
}
-/*
+/*
1 = valid chan
0 = chan is in valid
*/
@@ -1678,7 +1678,7 @@ void moduleAddAnopeCmds()
pmodule_set_umode(viagra_set_umode);
}
-/**
+/**
* Now tell anope how to use us.
**/
int AnopeInit(int argc, char **argv)
@@ -1710,6 +1710,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/viagra.h b/src/protocol/viagra.h
index 1aa687eca..75b499d05 100644
--- a/src/protocol/viagra.h
+++ b/src/protocol/viagra.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.
+ *
*
*/
@@ -130,3 +130,7 @@ int viagra_flood_mode_check(char *value);
void viagra_cmd_jupe(char *jserver, char *who, char *reason);
int viagra_valid_nick(char *nick);
void viagra_cmd_ctcp(char *source, char *dest, char *buf);
+
+class ViagraIRCdProto : public IRCDProtoNew {
+ public:
+} ircd_proto;