]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cban.cpp
Fix previous module mismatch message; "remote" is misleading when sent as an ERROR
[user/henk/code/inspircd.git] / src / modules / m_cban.cpp
index 472b5ad09d77f54687e4787e26819e15264652b5..e9cf1ce0aacc58a23fb9b992dbddd212b4200e69 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -47,7 +47,7 @@ public:
 
        void DisplayExpiry()
        {
-               ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed CBan %s (set by %s %ld seconds ago)", this->matchtext.c_str(), this->source, this->duration);
+               ServerInstance->SNO->WriteToSnoMask('x',"Removing expired CBan %s (set by %s %ld seconds ago)", this->matchtext.c_str(), this->source, (long int)(ServerInstance->Time() - this->set_time));
        }
 
        const char* Displayable()
@@ -81,7 +81,7 @@ class CBanFactory : public XLineFactory
 class CommandCBan : public Command
 {
  public:
-       CommandCBan(InspIRCd* Me) : Command(Me, "CBAN", "o", 1)
+       CommandCBan(InspIRCd* Me) : Command(Me, "CBAN", "o", 1, 3)
        {
                this->source = "m_cban.so";
                this->syntax = "<channel> [<duration> :<reason>]";
@@ -127,13 +127,12 @@ class CommandCBan : public Command
                                {
                                        if (!duration)
                                        {
-                                               ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent CBan for %s.", user->nick.c_str(), parameters[0].c_str());
+                                               ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent CBan for %s: %s", user->nick.c_str(), parameters[0].c_str(), parameters[2].c_str());
                                        }
                                        else
                                        {
                                                time_t c_requires_crap = duration + ServerInstance->Time();
-                                               ServerInstance->SNO->WriteToSnoMask('x', "%s added timed CBan for %s, expires on %s", user->nick.c_str(), parameters[0].c_str(),
-                                               ServerInstance->TimeString(c_requires_crap).c_str());
+                                               ServerInstance->SNO->WriteToSnoMask('x', "%s added timed CBan for %s, expires on %s: %s", user->nick.c_str(), parameters[0].c_str(), ServerInstance->TimeString(c_requires_crap).c_str(), parameters[2].c_str());
                                        }
 
                                        ServerInstance->XLines->ApplyLines();