summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormark mark@31f1291d-b8d6-0310-a050-a5561fc1590b <mark mark@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-12-28 22:51:49 +0000
committermark mark@31f1291d-b8d6-0310-a050-a5561fc1590b <mark mark@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-12-28 22:51:49 +0000
commit0f5b5ab9369f538e41d352deaaa59e717bcfb103 (patch)
treea6af9ba1f5b2698a6cff4262a901e29c15b920ff /src
parent4a5cf6e1e3a3e8031cc4980477c456ec684cb971 (diff)
BUILD : 1.7.19 (1323) BUGS : 692 NOTES : Added RSQUIT support to the InspIRCd 1.1 protocol module
git-svn-id: svn://svn.anope.org/anope/trunk@1323 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1041 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/protocol/inspircd11.c56
-rwxr-xr-xsrc/protocol/inspircd11.h1
2 files changed, 34 insertions, 23 deletions
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c
index 5e489300f..0e35986e0 100644
--- a/src/protocol/inspircd11.c
+++ b/src/protocol/inspircd11.c
@@ -134,7 +134,7 @@ IRCDCAPAB myIrcdcap[] = {
{
CAPAB_NOQUIT, /* NOQUIT */
0, /* TSMODE */
- 0, /* UNCONNECT */
+ 1, /* UNCONNECT */
0, /* NICKIP */
0, /* SJOIN */
0, /* ZIP */
@@ -481,6 +481,7 @@ void moduleAddIRCDMsgs(void) {
m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
+ m = createMessage("RSQUIT", anope_event_rsquit); addCoreMessage(IRCD,m);
m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
@@ -616,7 +617,7 @@ void inspircd_cmd_mode(char *source, char *dest, char *buf)
return;
}
- send_cmd(source ? source : s_OperServ, "FMODE %s %u %s", dest, findchan(dest)->creation_time, buf);
+ send_cmd(source ? source : s_OperServ, "FMODE %s %u %s", dest, (unsigned int)findchan(dest)->creation_time, buf);
}
int anope_event_version(char *source, int ac, char **av)
@@ -1268,6 +1269,20 @@ int anope_event_squit(char *source, int ac, char **av)
return MOD_CONT;
}
+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;
+}
+
int anope_event_quit(char *source, int ac, char **av)
{
if (ac != 1)
@@ -1568,41 +1583,36 @@ int anope_event_capab(char *source, int ac, char **av)
quitting = 1;
return MOD_STOP;
}
- if (has_svsholdmod == 0) {
- anope_cmd_global(s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
- return MOD_CONT;
- }
- if (has_sajoinmod == 0) {
- anope_cmd_global(s_OperServ, "SAJOIN missing, Usage disabled until module is loaded.");
- return MOD_CONT;
+ if (has_svsholdmod == 0) {
+ anope_cmd_global(s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
+ }
+ if (has_sajoinmod == 0) {
+ anope_cmd_global(s_OperServ, "SAJOIN missing, Usage disabled until module is loaded.");
}
- if (has_sapartmod == 0) {
- anope_cmd_global(s_OperServ, "SAPART missing, Usage disabled until module is loaded.");
- return MOD_CONT;
+ if (has_sapartmod == 0) {
+ anope_cmd_global(s_OperServ, "SAPART missing, Usage disabled until module is loaded.");
}
- if (has_sanickmod == 0) {
- anope_cmd_global(s_OperServ, "SANICK missing, Usage disabled until module is loaded.");
- return MOD_CONT;
+ if (has_sanickmod == 0) {
+ anope_cmd_global(s_OperServ, "SANICK missing, Usage disabled until module is loaded.");
}
- if (has_chghostmod == 0) {
- anope_cmd_global(s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
- return MOD_CONT;
+ if (has_chghostmod == 0) {
+ anope_cmd_global(s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
}
- if (has_chgidentmod == 0) {
- anope_cmd_global(s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
- return MOD_CONT;
+ if (has_chgidentmod == 0) {
+ anope_cmd_global(s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
}
/* Generate a fake capabs parsing call so things like NOQUIT work
* fine. It's ugly, but it works....
*/
- argc = 5;
- argv = scalloc(5, sizeof(char *));
+ argc = 6;
+ argv = scalloc(6, sizeof(char *));
argv[0] = "NOQUIT";
argv[1] = "SSJ3";
argv[2] = "NICK2";
argv[3] = "VL";
argv[4] = "TLKEXT";
+ argv[5] = "UNCONNECT";
capab_parse(argc, argv);
}
diff --git a/src/protocol/inspircd11.h b/src/protocol/inspircd11.h
index 79689ee16..d8023e811 100755
--- a/src/protocol/inspircd11.h
+++ b/src/protocol/inspircd11.h
@@ -131,3 +131,4 @@ 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);
+int anope_event_rsquit(char *source, int ac, char **av);