summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/modules.h3
-rw-r--r--src/commands/cmd_list.cpp15
-rw-r--r--src/configreader.cpp2
-rw-r--r--src/modmanager_dynamic.cpp3
-rw-r--r--src/modules/m_hideoper.cpp6
-rw-r--r--src/modules/m_operprefix.cpp18
-rw-r--r--src/xline.cpp3
-rw-r--r--win/inspircd.rc.cmake2
8 files changed, 37 insertions, 15 deletions
diff --git a/include/modules.h b/include/modules.h
index cd0d5aad0..9857012fc 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1717,7 +1717,8 @@ struct AllModuleList {
break; \
} \
return TRUE; \
- }
+ } \
+ extern "C" DllExport const char inspircd_src_version[] = VERSION " r" REVISION;
#else
diff --git a/src/commands/cmd_list.cpp b/src/commands/cmd_list.cpp
index 2f417bc04..2c420d1dd 100644
--- a/src/commands/cmd_list.cpp
+++ b/src/commands/cmd_list.cpp
@@ -82,14 +82,15 @@ CmdResult CommandList::Handle (const std::vector<std::string>& parameters, User
// if the channel is not private/secret, OR the user is on the channel anyway
bool n = (i->second->HasUser(user) || user->HasPrivPermission("channels/auspex"));
- if (!n && i->second->IsModeSet('p'))
+ // If we're not in the channel and +s is set on it, we want to ignore it
+ if (n || !i->second->IsModeSet('s'))
{
- /* Channel is +p and user is outside/not privileged */
- user->WriteNumeric(322, "%s * %ld :",user->nick.c_str(), users);
- }
- else
- {
- if (n || !i->second->IsModeSet('s'))
+ if (!n && i->second->IsModeSet('p'))
+ {
+ /* Channel is +p and user is outside/not privileged */
+ user->WriteNumeric(322, "%s * %ld :",user->nick.c_str(), users);
+ }
+ else
{
/* User is in the channel/privileged, channel is not +s */
user->WriteNumeric(322, "%s %s %ld :[+%s] %s",user->nick.c_str(),i->second->name.c_str(),users,i->second->ChanModes(n),i->second->topic.c_str());
diff --git a/src/configreader.cpp b/src/configreader.cpp
index bd147782e..b3caf8c75 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -730,7 +730,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
if (valid)
ServerInstance->WritePID(this->PID);
- if (old)
+ if (old && valid)
{
// On first run, ports are bound later on
FailedPortList pl;
diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp
index 045b488b5..050f41c75 100644
--- a/src/modmanager_dynamic.cpp
+++ b/src/modmanager_dynamic.cpp
@@ -36,7 +36,10 @@ bool ModuleManager::Load(const std::string& filename, bool defer)
{
/* Don't allow people to specify paths for modules, it doesn't work as expected */
if (filename.find('/') != std::string::npos)
+ {
+ LastModuleError = "You can't load modules with a path: " + filename;
return false;
+ }
char modfile[MAXBUF];
snprintf(modfile,MAXBUF,"%s/%s",ServerInstance->Config->ModPath.c_str(),filename.c_str());
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index b83c7de1a..88b0c4cdf 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -82,7 +82,11 @@ class ModuleHideOper : public Module
if (user->IsModeSet('H') && !source->HasPrivPermission("users/auspex"))
{
// hide the "*" that marks the user as an oper from the /WHO line
- std::string::size_type pos = line.find("*");
+ std::string::size_type spcolon = line.find(" :");
+ if (spcolon == std::string::npos)
+ return; // Another module hid the user completely
+ std::string::size_type sp = line.rfind(' ', spcolon-1);
+ std::string::size_type pos = line.find('*', sp);
if (pos != std::string::npos)
line.erase(pos, 1);
// hide the line completely if doing a "/who * o" query
diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp
index 62ddb6c67..9f1f6cc5e 100644
--- a/src/modules/m_operprefix.cpp
+++ b/src/modules/m_operprefix.cpp
@@ -85,7 +85,7 @@ class ModuleOperPrefixMode : public Module
{
ServerInstance->Modules->AddService(opm);
- Implementation eventlist[] = { I_OnUserPreJoin, I_OnPostOper, I_OnLoadModule, I_OnUnloadModule };
+ Implementation eventlist[] = { I_OnUserPreJoin, I_OnPostOper, I_OnLoadModule, I_OnUnloadModule, I_OnPostJoin };
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
/* To give clients a chance to learn about the new prefix we don't give +y to opers
@@ -110,6 +110,22 @@ class ModuleOperPrefixMode : public Module
return MOD_RES_PASSTHRU;
}
+ void OnPostJoin(Membership* memb)
+ {
+ if ((!IS_LOCAL(memb->user)) || (!IS_OPER(memb->user)) || (((mw_added) && (memb->user->IsModeSet('H')))))
+ return;
+
+ if (memb->hasMode(opm.GetModeChar()))
+ return;
+
+ // The user was force joined and OnUserPreJoin() did not run. Set the operprefix now.
+ std::vector<std::string> modechange;
+ modechange.push_back(memb->chan->name);
+ modechange.push_back("+y");
+ modechange.push_back(memb->user->nick);
+ ServerInstance->SendGlobalMode(modechange, ServerInstance->FakeClient);
+ }
+
void SetOperPrefix(User* user, bool add)
{
std::vector<std::string> modechange;
diff --git a/src/xline.cpp b/src/xline.cpp
index 66d24f439..b710c5c43 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -598,9 +598,6 @@ void GLine::Apply(User* u)
bool ELine::Matches(User *u)
{
- if (u->exempt)
- return false;
-
if (InspIRCd::Match(u->ident, this->identmask, ascii_case_insensitive_map))
{
if (InspIRCd::MatchCIDR(u->host, this->hostmask, ascii_case_insensitive_map) ||
diff --git a/win/inspircd.rc.cmake b/win/inspircd.rc.cmake
index 20c7839fe..ba52ad5d2 100644
--- a/win/inspircd.rc.cmake
+++ b/win/inspircd.rc.cmake
@@ -22,7 +22,7 @@ BEGIN
VALUE "FileDescription", "InspIRCd"
VALUE "FileVersion", "@FULL_VERSION@"
VALUE "InternalName", "InspIRCd"
- VALUE "LegalCopyright", "Copyright (c) 2014 InspIRCd Development Team"
+ VALUE "LegalCopyright", "Copyright (c) 2015 InspIRCd Development Team"
VALUE "OriginalFilename", "inspircd.exe"
VALUE "ProductName", "InspIRCd - The Inspire IRC Daemon"
VALUE "ProductVersion", "@FULL_VERSION@"