diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/treesocket.h | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index 15ca8f4cb..49c60ea13 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -96,6 +96,8 @@ class TreeSocket : public InspSocket std::string theirchallenge; /* Challenge recv for challenge/response */ std::string OutboundPass; /* Outbound password */ + static std::map<std::string, std::string> warned; /* Server names that have had protocol violation warnings displayed for them */ + public: /** Because most of the I/O gubbins are encapsulated within diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 7a24ff84b..07f477264 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -1155,11 +1155,12 @@ bool TreeSocket::ProcessLine(std::string &line) userrec* x = Instance->FindNick(prefix); if (x) { - Instance->Log(DEFAULT, - "WARNING: I revceived modes '%s' from another server '%s'. This is not compliant with InspIRCd. Please check that server for bugs.", - params[1].c_str(), x->server); - Instance->SNO->WriteToSnoMask('d', "WARNING: The server %s is sending nonstandard modes: '%s MODE %s' and may cause desyncs.", - x->server, x->nick, params[1].c_str()); + if (warned.find(x->server) == warned.end()) + { + Instance->Log(DEFAULT,"WARNING: I revceived modes '%s' from another server '%s'. This is not compliant with InspIRCd. Please check that server for bugs.", params[1].c_str(), x->server); + Instance->SNO->WriteToSnoMask('d', "WARNING: The server %s is sending nonstandard modes: '%s MODE %s' where FMODE should be used, and may cause desyncs.", x->server, x->nick, params[1].c_str()); + warned[x->server] = x->nick; + } } } } |