diff options
| author | DukePyrolator <DukePyrolator@anope.org> | 2010-12-30 05:50:55 +0100 |
|---|---|---|
| committer | DukePyrolator <DukePyrolator@anope.org> | 2010-12-30 05:50:55 +0100 |
| commit | 2784cd17fc5e0ee4ad0571a6b9e131fa38a93a65 (patch) | |
| tree | 9978409f958f97d4932879c0d65363ec24b799d5 /modules/protocol | |
| parent | 292e1875246a6398cdc9f04ee91d7bb43dc40b45 (diff) | |
| parent | 03cc9eb5c597e37239debac25a7ed6ad4f4d9411 (diff) | |
Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'modules/protocol')
| -rw-r--r-- | modules/protocol/bahamut.cpp | 7 | ||||
| -rw-r--r-- | modules/protocol/inspircd-ts6.h | 5 | ||||
| -rw-r--r-- | modules/protocol/inspircd11.cpp | 3 | ||||
| -rw-r--r-- | modules/protocol/plexus.cpp | 8 | ||||
| -rw-r--r-- | modules/protocol/ratbox.cpp | 8 | ||||
| -rw-r--r-- | modules/protocol/unreal32.cpp | 23 |
6 files changed, 38 insertions, 16 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 28939c7fb..21d351f0c 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -280,6 +280,10 @@ class BahamutIRCdProto : public IRCDProto ircdproto->SendMode(NickServ, u, "+d %d", u->timestamp); } + void SendChannel(Channel *c, const Anope::string &modes) + { + send_cmd("", "SJOIN %ld %s %s :", static_cast<long>(c->creation_time), c->name.c_str(), modes.c_str()); + } }; class BahamutIRCdMessage : public IRCdMessage @@ -378,9 +382,6 @@ class BahamutIRCdMessage : public IRCdMessage { c->creation_time = ts; c->Reset(); - - /* Reset mlock */ - check_modes(c); } /* Their TS is newer than ours, our modes > theirs, unset their modes if need be */ else if (ts > c->creation_time) diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h index 4146e27fc..18f046d76 100644 --- a/modules/protocol/inspircd-ts6.h +++ b/modules/protocol/inspircd-ts6.h @@ -230,6 +230,11 @@ class InspIRCdTS6Proto : public IRCDProto send_cmd(Config->Numeric, "METADATA %s accountname :", u->GetUID().c_str()); } + void SendChannel(Channel *c, const Anope::string &modes) + { + send_cmd(Config->Numeric, "FJOIN %s %ld %s :", c->name.c_str(), static_cast<long>(c->creation_time), modes.c_str()); + } + bool IsNickValid(const Anope::string &nick) { /* InspIRCd, like TS6, uses UIDs on collision, so... */ diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index 270a3e013..e642d8f50 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -607,9 +607,6 @@ class InspircdIRCdMessage : public IRCdMessage { c->creation_time = ts; c->Reset(); - - /* Reset mlock */ - check_modes(c); } /* Their TS is newer than ours, our modes > theirs, unset their modes if need be */ else if (ts > c->creation_time) diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index 9dddaebdb..f18dac52b 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -247,6 +247,11 @@ class PlexusProto : public IRCDProto { send_cmd(bi->GetUID(), "ENCAP * TOPIC %s %s %lu :%s", c->name.c_str(), c->topic_setter.c_str(), static_cast<unsigned long>(c->topic_time + 1), c->topic.c_str()); } + + void SendChannel(Channel *c, const Anope::string &modes) + { + send_cmd(Config->Numeric, "SJOIN %ld %s %s :", static_cast<long>(c->creation_time), c->name.c_str(), modes.c_str()); + } }; class PlexusIRCdMessage : public IRCdMessage @@ -357,9 +362,6 @@ class PlexusIRCdMessage : public IRCdMessage { c->creation_time = ts; c->Reset(); - - /* Reset mlock */ - check_modes(c); } /* Their TS is newer than ours, our modes > theirs, unset their modes if need be */ else if (ts > c->creation_time) diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 914010b98..43debc78d 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -232,6 +232,11 @@ class RatboxProto : public IRCDProto send_cmd(Config->Numeric, "ENCAP * SU %s", u->GetUID().c_str()); } + void SendChannel(Channel *c, const Anope::string &modes) + { + send_cmd("", "SJOIN %ld %s %s :", static_cast<long>(c->creation_time), c->name.c_str(), modes.c_str()); + } + bool IsNickValid(const Anope::string &nick) { /* TS6 Save extension -Certus */ @@ -377,9 +382,6 @@ class RatboxIRCdMessage : public IRCdMessage { c->creation_time = ts; c->Reset(); - - /* Reset mlock */ - check_modes(c); } /* Their TS is newer than ours, our modes > theirs, unset their modes if need be */ else if (ts > c->creation_time) diff --git a/modules/protocol/unreal32.cpp b/modules/protocol/unreal32.cpp index 4c0d79ee2..cc4fc23df 100644 --- a/modules/protocol/unreal32.cpp +++ b/modules/protocol/unreal32.cpp @@ -375,6 +375,24 @@ class UnrealIRCdProto : public IRCDProto { ircdproto->SendMode(NickServ, u, "+d 1"); } + + void SendChannel(Channel *c, const Anope::string &modes) + { + /* Unreal does not support updating a channels TS without actually joining a user, + * so we will join and part us now + */ + BotInfo *bi = whosends(c->ci); + if (c->FindUser(bi) == NULL) + { + bi->Join(c, true); + bi->Part(c); + } + else + { + bi->Part(c); + bi->Join(c, true); + } + } }; class Unreal32IRCdMessage : public IRCdMessage @@ -695,9 +713,6 @@ class Unreal32IRCdMessage : public IRCdMessage { c->creation_time = ts; c->Reset(); - - /* Reset mlock */ - check_modes(c); } /* Their TS is newer than ours, our modes > theirs, unset their modes if need be */ else if (ts > c->creation_time) @@ -977,7 +992,7 @@ bool ChannelModeFlood::IsValid(const Anope::string &value) const if (value[0] != ':' && convertTo<unsigned>(value[0] == '*' ? value.substr(1) : value, rest, false) > 0 && rest[0] == ':' && rest.length() > 1 && convertTo<unsigned>(rest.substr(1), rest, false) > 0 && rest.empty()) return true; } - catch (const CoreException &) { } // convertTo fail + catch (const ConvertException &) { } /* '['<number><1 letter>[optional: '#'+1 letter],[next..]']'':'<number> */ size_t end_bracket = value.find(']', 1); |
