diff options
author | Adam <Adam@anope.org> | 2011-02-09 20:09:26 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-02-09 20:09:26 -0500 |
commit | f463b772b020b272f3322799c9a55b755cdf3067 (patch) | |
tree | 9771d3e17f117113977595e38af2917af3f6a6ef | |
parent | eec897762cbaf8bc98be509a707f942e997f56eb (diff) |
Removed a lot of the old capab flags we dont/have never used
-rw-r--r-- | docs/IRCD | 69 | ||||
-rw-r--r-- | include/servers.h | 26 | ||||
-rw-r--r-- | modules/protocol/bahamut.cpp | 4 | ||||
-rw-r--r-- | modules/protocol/inspircd11.cpp | 4 | ||||
-rw-r--r-- | modules/protocol/inspircd12.cpp | 4 | ||||
-rw-r--r-- | modules/protocol/inspircd20.cpp | 4 | ||||
-rw-r--r-- | modules/protocol/plexus.cpp | 4 | ||||
-rw-r--r-- | modules/protocol/ratbox.cpp | 4 | ||||
-rw-r--r-- | modules/protocol/unreal32.cpp | 4 | ||||
-rw-r--r-- | src/protocol.cpp | 1 | ||||
-rw-r--r-- | src/servers.cpp | 22 |
11 files changed, 8 insertions, 138 deletions
@@ -175,74 +175,19 @@ How To Add IRCd Support 5) CAPAB/PROTOCTL
- Most IRCD send a CAPAB or PROTOCTL line so that they can work out what
- the other end of the connection is capable of doing. Anope has a function
- to read these lines and set itself up to to handle these events better.
- When adding support for your ircd, take the following steps.
+ Most IRCDs send a CAPAB or PROTOCTL line so that they can work out what
+ the other end of the connection is capable of doing. The protocol module should
+ handle all of these without the cores knowledge with the exception of the following:
- 1) In the module constructor you must tell Anope what the uplink is capable of that
- isn't already passed in the CAPAB/PROTOCTL, you do this by something similar to:
-
- CapabType c[] = { CAPAB_NOQUIT, CAPAB_NICKIP, CAPAB_ZIP, CAPAB_TOKEN, CAPAB_SSJ3, CAPAB_NICK2, CAPAB_VL, CAPAB_TLKEXT, CAPAB_CHANMODE, CAPAB_SJB64, CAPAB_NICKCHARS };
- for (unsigned i = 0; i < 11; ++i)
- Capab.SetFlag(c[i]);
-
- Anything else given to Anope in the CAPAB/PROTOCTL message will be handled later by CapabParse.
-
- The available CAPAB options are:
-
--------------------------------------------------------------------------
Define | Description
- ----------------|------------|-----------|--------------------------------
+ ----------------|---------------------------------------------------------
CAPAB_NOQUIT | NOQUIT protocol support
CAPAB_TSMODE | Chanmodes are timestamped
CAPAB_UNCONNECT | UNCONNECT protocol support
- CAPAB_NICKIP | IP sent in the NICK line
- CAPAB_NSJOIN | Smart SJOIN support
- CAPAB_ZIP | Support for gzipped links
- CAPAB_BURST | Supports BURST command
- CAPAB_TS3 | Support for TS3 protocol
- CAPAB_TS5 | Support for TS5 protocol
- CAPAB_DKEY | DH-Key exchange using DKEY
- CAPAB_DOZIP | Link traffic will be gzipped
- CAPAB_DODKEY | Do DKEY with this link
- CAPAB_QS | Supports quit storm removal
- CAPAB_SCS | String Cache System support
- CAPAB_PT4 | Support for PT4 protocol
- CAPAB_UID | Support for UIDs
- CAPAB_KNOCK | Supports KNOCK
- CAPAB_CLIENT | Supports CLIENT
- CAPAB_IPV6 | Support for IPv6 addresses
- CAPAB_SSJ5 | Smart Join protocol 5 support
- CAPAB_SN2 | Support for SN2 protocol
- CAPAB_VHOST | Supports VHOST protocol
- CAPAB_TOKEN | Supports s2s tokens
- CAPAB_SSJ3 | Smart Join protocol 3 support
- CAPAB_NICK2 | Support for extended NICK (v2)
- CAPAB_UMODE2 | Supports UMODE2 command
- CAPAB_VL | VLine information in info field
- CAPAB_TLKEXT | Not 8, but 10 params in TKL's
- CAPAB_CHANMODE | Channel modes are passed here
- CAPAB_SJB64 | SJOIN timestamps are base64 encoded
- CAPAB_NICKCHARS | Character set used by the IRCD for nicks
-
- 2) Ensure that the CAPAB/PROTOCTL event his handled correctly.
-
- A) In the function module constructor make sure that you have the
- following two lines:
-
- Message message_capab("CAPAB", event_capab);
-
- B) Add the function to handle the event
-
- bool event_capab(const Anope::string &source, const std::vector<Anope::string> ¶ms)
- {
- CapabParse(params);
- return true;
- }
-
- This function should call the CapabParse function which parses
- the received CAPAB/PROTOCTL line.
+ CAPAB_QS | Quitstorm - same as NOQUIT
+
+ You can override the default OnCapab method in IRCdMessage if required.
6) IRCDProto Class
diff --git a/include/servers.h b/include/servers.h index c9d85804b..f1a39e169 100644 --- a/include/servers.h +++ b/include/servers.h @@ -18,33 +18,7 @@ enum CapabType CAPAB_NOQUIT, CAPAB_TSMODE, CAPAB_UNCONNECT, - CAPAB_NICKIP, - CAPAB_NSJOIN, - CAPAB_ZIP, - CAPAB_BURST, - CAPAB_TS3, - CAPAB_TS5, - CAPAB_DKEY, - CAPAB_DOZIP, - CAPAB_DODKEY, CAPAB_QS, - CAPAB_SCS, - CAPAB_PT4, - CAPAB_UID, - CAPAB_KNOCK, - CAPAB_CLIENT, - CAPAB_IPV6, - CAPAB_SSJ5, - CAPAB_SN2, - CAPAB_VHOST, - CAPAB_TOKEN, - CAPAB_SSJ3, - CAPAB_NICK2, - CAPAB_VL, - CAPAB_TLKEXT, - CAPAB_CHANMODE, - CAPAB_SJB64, - CAPAB_NICKCHARS, CAPAB_END }; diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index b98bb0175..ecb493dba 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -603,10 +603,6 @@ class ProtoBahamut : public Module this->SetAuthor("Anope"); this->SetType(PROTOCOL); - CapabType c[] = { CAPAB_NOQUIT, CAPAB_TSMODE, CAPAB_UNCONNECT, CAPAB_BURST, CAPAB_DKEY, CAPAB_DOZIP }; - for (unsigned i = 0; i < 6; ++i) - Capab.SetFlag(c[i]); - AddModes(); pmodule_ircd_var(myIrcd); diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index 66300cde3..b945370bf 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -904,10 +904,6 @@ class ProtoInspIRCd : public Module this->SetAuthor("Anope"); this->SetType(PROTOCOL); - CapabType c[] = { CAPAB_NOQUIT, CAPAB_SSJ3, CAPAB_NICK2, CAPAB_VL, CAPAB_TLKEXT }; - for (unsigned i = 0; i < 5; ++i) - Capab.SetFlag(c[i]); - AddModes(); pmodule_ircd_var(myIrcd); diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index 9efc80b51..dbb69a3c1 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -726,10 +726,6 @@ class ProtoInspIRCd : public Module this->SetAuthor("Anope"); this->SetType(PROTOCOL); - CapabType c[] = { CAPAB_NOQUIT, CAPAB_SSJ3, CAPAB_NICK2, CAPAB_VL, CAPAB_TLKEXT }; - for (unsigned i = 0; i < 5; ++i) - Capab.SetFlag(c[i]); - pmodule_ircd_var(myIrcd); pmodule_ircd_proto(&this->ircd_proto); pmodule_ircd_message(&this->ircd_message); diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index dcfdbf298..2307de9df 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -701,10 +701,6 @@ class ProtoInspIRCd : public Module this->SetAuthor("Anope"); this->SetType(PROTOCOL); - CapabType c[] = { CAPAB_NOQUIT, CAPAB_SSJ3, CAPAB_NICK2, CAPAB_VL, CAPAB_TLKEXT }; - for (unsigned i = 0; i < 5; ++i) - Capab.SetFlag(c[i]); - pmodule_ircd_var(myIrcd); pmodule_ircd_proto(&this->ircd_proto); pmodule_ircd_message(&this->ircd_message); diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index 8243e605a..a1fad8d5b 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -661,10 +661,6 @@ class ProtoPlexus : public Module this->SetAuthor("Anope"); this->SetType(PROTOCOL); - CapabType c[] = { CAPAB_ZIP, CAPAB_TS5, CAPAB_QS, CAPAB_UID, CAPAB_KNOCK }; - for (unsigned i = 0; i < 5; ++i) - Capab.SetFlag(c[i]); - AddModes(); pmodule_ircd_var(myIrcd); diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 9d8864d10..c7797c166 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -580,10 +580,6 @@ class ProtoRatbox : public Module this->SetAuthor("Anope"); this->SetType(PROTOCOL); - CapabType c[] = { CAPAB_ZIP, CAPAB_TS5, CAPAB_QS, CAPAB_UID, CAPAB_KNOCK, CAPAB_TSMODE }; - for (unsigned i = 0; i < 6; ++i) - Capab.SetFlag(c[i]); - AddModes(); pmodule_ircd_var(myIrcd); diff --git a/modules/protocol/unreal32.cpp b/modules/protocol/unreal32.cpp index d02987038..35af8ad70 100644 --- a/modules/protocol/unreal32.cpp +++ b/modules/protocol/unreal32.cpp @@ -1065,10 +1065,6 @@ class ProtoUnreal : public Module this->SetAuthor("Anope"); this->SetType(PROTOCOL); - CapabType c[] = { CAPAB_NOQUIT, CAPAB_NICKIP, CAPAB_ZIP, CAPAB_TOKEN, CAPAB_SSJ3, CAPAB_NICK2, CAPAB_VL, CAPAB_TLKEXT, CAPAB_CHANMODE, CAPAB_NICKCHARS }; - for (unsigned i = 0; i < 10; ++i) - Capab.SetFlag(c[i]); - AddModes(); pmodule_ircd_var(myIrcd); diff --git a/src/protocol.cpp b/src/protocol.cpp index 56d559768..a035d2f22 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -574,6 +574,7 @@ bool IRCdMessage::OnCapab(const Anope::string &, const std::vector<Anope::string if (Capab_Info[j].Token.equals_ci(params[i])) { Capab.SetFlag(Capab_Info[j].Flag); + Log(LOG_DEBUG) << "Capab: Enabling " << Capab_Info[j].Token; break; } } diff --git a/src/servers.cpp b/src/servers.cpp index ada6a8632..51ec8466a 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -19,29 +19,7 @@ CapabInfo Capab_Info[] = { {"NOQUIT", CAPAB_NOQUIT}, {"TSMODE", CAPAB_TSMODE}, {"UNCONNECT", CAPAB_UNCONNECT}, - {"NICKIP", CAPAB_NICKIP}, - {"SSJOIN", CAPAB_NSJOIN}, - {"ZIP", CAPAB_ZIP}, - {"BURST", CAPAB_BURST}, - {"TS5", CAPAB_TS5}, - {"TS3", CAPAB_TS3}, - {"DKEY", CAPAB_DKEY}, - {"PT4", CAPAB_PT4}, - {"SCS", CAPAB_SCS}, {"QS", CAPAB_QS}, - {"UID", CAPAB_UID}, - {"KNOCK", CAPAB_KNOCK}, - {"CLIENT", CAPAB_CLIENT}, - {"IPV6", CAPAB_IPV6}, - {"SSJ5", CAPAB_SSJ5}, - {"SN2", CAPAB_SN2}, - {"TOK1", CAPAB_TOKEN}, - {"TOKEN", CAPAB_TOKEN}, - {"VHOST", CAPAB_VHOST}, - {"SSJ3", CAPAB_SSJ3}, - {"SJB64", CAPAB_SJB64}, - {"CHANMODES", CAPAB_CHANMODE}, - {"NICKCHARS", CAPAB_NICKCHARS}, {"", CAPAB_END} }; |