diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-05 11:56:39 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-05 11:56:39 +0000 |
commit | 7775dc1be52c20fba05697521197742b5e288cb9 (patch) | |
tree | 77a740872edec1917fcd35fd1d0bcc26ed3b4365 | |
parent | edd95854edea5082dd56c0bcd267d0f52b8a6f8a (diff) |
Make debug warning for broken servers once per servername only
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6884 e03df62e-2008-0410-955e-edbf42e46eb7
-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; + } } } } |