]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix a couple of issues
authorattilamolnar <attilamolnar@hush.com>
Thu, 8 Aug 2013 13:10:48 +0000 (15:10 +0200)
committerattilamolnar <attilamolnar@hush.com>
Thu, 8 Aug 2013 13:10:48 +0000 (15:10 +0200)
- Wrong doc for Snomask::GetDescription()
- Incorrect idle time when WHOISing remote users
- String + int = garbage
- Remote MODE commands (user mode changes) being broadcast in addition to being forwarded
- Incorrect revision being shown

include/modules.h
include/snomasks.h
src/commands/cmd_mode.cpp
src/commands/cmd_whois.cpp
src/inspircd.cpp
src/modules/m_channames.cpp
src/modules/m_ojoin.cpp
src/modules/m_spanningtree/idle.cpp
win/config.h.cmake

index 710a39193546dff81c4b0fbb6911ed66421a122b..d13ff58b0cb8c5e2b9822423e239e080cb7ab9fa 100644 (file)
@@ -1419,7 +1419,7 @@ struct AllModuleList {
        { \
                return new y; \
        } \
-       extern "C" const char inspircd_src_version[] = VERSION " r" REVISION;
+       extern "C" const char inspircd_src_version[] = VERSION " " REVISION;
 #endif
 
 #define COMMAND_INIT(c) MODULE_INIT(CommandModule<c>)
index db398922505e1c89750764e68c2fbe185ebf4784..df4faab47b982c71781b900f183709e2e59c2951 100644 (file)
@@ -59,8 +59,8 @@ class Snomask
        void Flush();
 
        /** Returns the description of this snomask
-        * @param remote If true the description of the uppercase (remote) variant of this snomask
-        * will be returned (i.e.: "REMOTE" will be prepended to the description).
+        * @param letter The letter of this snomask. If uppercase, the description of the remote
+        * variant of this snomask will be returned (i.e.: "REMOTE" will be prepended to the description).
         * @return The description of this snomask
         */
        std::string GetDescription(char letter) const;
index adb1d483baf4d9348201a94b85ce4487d31e4447..1a42835e501ccd6929d9b72ed427017ce62f312c 100644 (file)
@@ -49,7 +49,7 @@ class CommandMode : public Command
  */
 CmdResult CommandMode::Handle (const std::vector<std::string>& parameters, User *user)
 {
-       ServerInstance->Modes->Process(parameters, user);
+       ServerInstance->Modes->Process(parameters, user, (IS_LOCAL(user) ? ModeParser::MODE_NONE : ModeParser::MODE_LOCALONLY));
        return CMD_SUCCESS;
 }
 
index f75bd13fe9de26ffc81f0beaafb4c875088c7672..0df6b65f0e8cde5dd8db2393c93f5c6c5b0ae80d 100644 (file)
@@ -196,7 +196,7 @@ CmdResult CommandWhois::HandleRemote(const std::vector<std::string>& parameters,
        if (!user)
                return CMD_FAILURE;
 
-       unsigned long idle = ConvToInt(parameters[1]);
+       unsigned long idle = ConvToInt(parameters.back());
        DoWhois(user, target, target->signon, idle);
 
        return CMD_SUCCESS;
index 78659089c1adf3c10730adf641b681628bcbc91c..59c65b931d34d6617b66e997695eef139c9def08 100644 (file)
@@ -358,7 +358,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
 
        if (do_version)
        {
-               std::cout << std::endl << VERSION << " r" << REVISION << std::endl;
+               std::cout << std::endl << VERSION << " " << REVISION << std::endl;
                Exit(EXIT_STATUS_NOERROR);
        }
 
index 4228d505033ccae1fa7e050ec9db51c3cc1b69b8..fcb2ef6d74d7fda8d38bcfbe0bb34138cb7ca19e 100644 (file)
@@ -82,7 +82,7 @@ class ModuleChannelNames : public Module
                        {
                                std::vector<std::string> modes;
                                modes.push_back(c->name);
-                               modes.push_back("-" + permchannelmode->GetModeChar());
+                               modes.push_back(std::string("-") + permchannelmode->GetModeChar());
 
                                ServerInstance->Modes->Process(modes, ServerInstance->FakeClient);
                        }
index 8f7fe4460e719d4e60fe567a0350a54375bef887..b0c206ab312731dc8d5d724da81f51dfb0e069ec 100644 (file)
@@ -69,7 +69,7 @@ class CommandOjoin : public SplitCommand
                        // they're already in the channel
                        std::vector<std::string> modes;
                        modes.push_back(parameters[0]);
-                       modes.push_back("+" + npmh->GetModeChar());
+                       modes.push_back(std::string("+") + npmh->GetModeChar());
                        if (op)
                        {
                                modes[1].push_back('o');
index bf074bf7fcfc91a5e449ae8dc21b06a8d5a268fb..2c95eaad140aaf0b53f5e50da2c481683f2c4e65 100644 (file)
@@ -60,7 +60,7 @@ bool TreeSocket::Whois(const std::string &prefix, parameterlist &params)
                        // Possible case when our clock ticked backwards
                        idle = 0;
                else
-                       idle = ((unsigned int) (localtarget->idle_lastmsg - ServerInstance->Time()));
+                       idle = ((unsigned int) (ServerInstance->Time() - localtarget->idle_lastmsg));
 
                parameterlist reply;
                reply.push_back(prefix);
index dbe705ceb1cf27048aafab7e0f59f3f503261020..081163fab59551461c4e060a08aaa4dab7828539 100644 (file)
@@ -2,7 +2,7 @@
 \r
 #define BRANCH "@MAJOR_VERSION@.@MINOR_VERSION@"\r
 #define VERSION "@FULL_VERSION@"\r
-#define REVISION "0"\r
+#define REVISION "release"\r
 #define SYSTEM "@CMAKE_SYSTEM@"\r
 \r
 #define CONFIG_PATH "@CONF_PATH@"\r