summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_shun.cpp33
-rw-r--r--win/inspircdVC80.vcproj40
2 files changed, 64 insertions, 9 deletions
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp
index 56d4be808..0cf62dd35 100644
--- a/src/modules/m_shun.cpp
+++ b/src/modules/m_shun.cpp
@@ -173,11 +173,11 @@ class ModuleShun : public Module
virtual int OnStats(char symbol, User* user, string_list& out)
{
- // XXX write me
-//format << Srv->Config->ServerName << " 223 " << user->nick << " :" << iter->banmask << " " << iter->set_on << " " << iter->length << " " <<
-//iter->set_by << " " << iter->reason;
+ if (symbol != 'S')
+ return 0;
- return 0;
+ ServerInstance->XLines->InvokeStats("SHUN", 223, user, out);
+ return 1;
}
virtual void OnUserConnect(User* user)
@@ -197,18 +197,33 @@ class ModuleShun : public Module
virtual int OnPreCommand(std::string &command, std::vector<std::string>& parameters, User* user, bool validated, const std::string &original_line)
{
- if((command != "PONG") && (command != "PING"))
+ if (validated || !user->GetExt("shunned"))
+ return 0;
+
+ if (!ServerInstance->XLines->MatchesLine("SHUN", user))
{
- if (user->GetExt("shunned"))
- return 1;
+ /* The shun previously set on this user has expired or been removed */
+ user->Shrink("shunned");
+ return 0;
}
- return 0;
+ if (command == "QUIT")
+ {
+ /* Allow QUIT but dont show any quit message */
+ parameters.clear();
+ return 0;
+ }
+
+ /* Always allow PONG and PING */
+ if (command == "PONG" || command == "PING")
+ return 0;
+
+ return 1;
}
virtual Version GetVersion()
{
- return Version(1,0,0,0,0,API_VERSION);
+ return Version(1,2,0,0,VF_VENDOR|VF_COMMON,API_VERSION);
}
};
diff --git a/win/inspircdVC80.vcproj b/win/inspircdVC80.vcproj
index 7d10bfac3..78126bb27 100644
--- a/win/inspircdVC80.vcproj
+++ b/win/inspircdVC80.vcproj
@@ -2754,6 +2754,26 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\src\modules\m_sasl.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\src\modules\m_securelist.cpp"
>
<FileConfiguration
@@ -2974,6 +2994,26 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\src\modules\m_shun.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\src\modules\m_silence.cpp"
>
<FileConfiguration