From 4099944013af67964be367b66b170edfb0db2404 Mon Sep 17 00:00:00 2001 From: Adam- Date: Sat, 6 Feb 2010 19:27:32 +0000 Subject: Recieve the max number of modes we can set at once from the IRCd and use it git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2783 5417fbe8-f217-4b02-8779-1006273d7864 --- src/protocol/bahamut.c | 1 + src/protocol/inspircd11.c | 6 ++++++ src/protocol/inspircd12.cpp | 6 ++++++ src/protocol/ratbox.c | 1 + src/protocol/unreal32.c | 1 + 5 files changed, 15 insertions(+) (limited to 'src/protocol') diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c index d9c32892c..1115e05e7 100644 --- a/src/protocol/bahamut.c +++ b/src/protocol/bahamut.c @@ -56,6 +56,7 @@ IRCDVar myIrcd[] = { 0, /* CIDR channelbans */ "$", /* TLD Prefix for Global */ false, /* Auth for users is sent after the initial NICK/UID command */ + 6, /* Max number of modes we can send per line */ } , {NULL} diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c index 551233b00..8ab4c2693 100644 --- a/src/protocol/inspircd11.c +++ b/src/protocol/inspircd11.c @@ -73,6 +73,7 @@ IRCDVar myIrcd[] = { 1, /* CIDR channelbans */ "$", /* TLD Prefix for Global */ false, /* Auth for users is sent after the initial NICK/UID command */ + 20, /* Max number of modes we can send per line */ } , {NULL} @@ -1079,6 +1080,11 @@ int anope_event_capab(const char *source, int ac, const char **av) } } } + else if (capab.find("MAXMODES=") != std::string::npos) + { + std::string maxmodes(capab.begin() + 10, capab.end()); + ircd->maxmodes = atoi(maxmodes.c_str()); + } } } else if (strcasecmp(av[0], "END") == 0) { if (!has_globopsmod) { diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index 3c5f4202c..27acf77a2 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -73,6 +73,7 @@ IRCDVar myIrcd[] = { 1, /* CIDR channelbans */ "$", /* TLD Prefix for Global */ true, /* Auth for users is sent after the initial NICK/UID command */ + 20, /* Max number of modes we can send per line */ } , {NULL} @@ -1266,6 +1267,11 @@ int anope_event_capab(const char *source, int ac, const char **av) } } } + else if (capab.find("MAXMODES=") != std::string::npos) + { + std::string maxmodes(capab.begin() + 10, capab.end()); + ircd->maxmodes = atoi(maxmodes.c_str()); + } } } else if (strcasecmp(av[0], "END") == 0) { if (!has_globopsmod) { diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c index 2564a99f3..b3fa7eaf0 100644 --- a/src/protocol/ratbox.c +++ b/src/protocol/ratbox.c @@ -54,6 +54,7 @@ IRCDVar myIrcd[] = { 0, /* CIDR channelbans */ "$$", /* TLD Prefix for Global */ false, /* Auth for users is sent after the initial NICK/UID command */ + 4, /* Max number of modes we can send per line */ } , {NULL} diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c index 71e2d09c4..8ef6ca187 100644 --- a/src/protocol/unreal32.c +++ b/src/protocol/unreal32.c @@ -56,6 +56,7 @@ IRCDVar myIrcd[] = { 0, /* CIDR channelbans */ "$", /* TLD Prefix for Global */ false, /* Auth for users is sent after the initial NICK/UID command */ + 12, /* Max number of modes we can send per line */ } , {NULL} -- cgit