diff options
-rw-r--r-- | src/commands/cmd_notice.cpp | 9 | ||||
-rw-r--r-- | src/configreader.cpp | 12 | ||||
-rw-r--r-- | src/socketengine.cpp | 7 |
3 files changed, 23 insertions, 5 deletions
diff --git a/src/commands/cmd_notice.cpp b/src/commands/cmd_notice.cpp index e10d6286d..b060a534f 100644 --- a/src/commands/cmd_notice.cpp +++ b/src/commands/cmd_notice.cpp @@ -110,6 +110,15 @@ CmdResult CommandNotice::Handle (const std::vector<std::string>& parameters, Use user->WriteNumeric(404, "%s %s :Cannot send to channel (+m)", user->nick.c_str(), chan->name.c_str()); return CMD_FAILURE; } + + if (ServerInstance->Config->RestrictBannedUsers) + { + if (chan->IsBanned(user)) + { + user->WriteNumeric(404, "%s %s :Cannot send to channel (you're banned)", user->nick.c_str(), chan->name.c_str()); + return CMD_FAILURE; + } + } } ModResult MOD_RESULT; diff --git a/src/configreader.cpp b/src/configreader.cpp index b8796430b..37742cc9f 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -657,10 +657,14 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid) for (int Index = 0; Index * sizeof(Deprecated) < sizeof(ChangedConfig); Index++) { std::string dummy; - if (ConfValue(ChangedConfig[Index].tag)->readString(ChangedConfig[Index].value, dummy, true)) - errstr << "Your configuration contains a deprecated value: <" - << ChangedConfig[Index].tag << ":" << ChangedConfig[Index].value << "> - " << ChangedConfig[Index].reason - << " (at " << ConfValue(ChangedConfig[Index].tag)->getTagLocation() << ")\n"; + ConfigTagList tags = ConfTags(ChangedConfig[Index].tag); + for(ConfigIter i = tags.first; i != tags.second; ++i) + { + if (i->second->readString(ChangedConfig[Index].value, dummy, true)) + errstr << "Your configuration contains a deprecated value: <" + << ChangedConfig[Index].tag << ":" << ChangedConfig[Index].value << "> - " << ChangedConfig[Index].reason + << " (at " << i->second->getTagLocation() << ")\n"; + } } Fill(); diff --git a/src/socketengine.cpp b/src/socketengine.cpp index 72075dd49..ccaa71aed 100644 --- a/src/socketengine.cpp +++ b/src/socketengine.cpp @@ -208,7 +208,12 @@ int SocketEngine::SendTo(EventHandler* fd, const void *buf, size_t len, int flag int SocketEngine::Connect(EventHandler* fd, const sockaddr *serv_addr, socklen_t addrlen) { - return connect(fd->GetFd(), serv_addr, addrlen); + int ret = connect(fd->GetFd(), serv_addr, addrlen); +#ifdef WINDOWS + if ((ret == SOCKET_ERROR) && (WSAGetLastError() == WSAEWOULDBLOCK)) + errno = EINPROGRESS; +#endif + return ret; } int SocketEngine::Shutdown(EventHandler* fd, int how) |