]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cban.cpp
Add 906, sasl aborted
[user/henk/code/inspircd.git] / src / modules / m_cban.cpp
index 7b245bfb88564f48e296cfb2e6d171c3c2fc49b5..f74c5d58eb364e16ba4a1c4572e3fb098e11d329 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -47,14 +47,14 @@ cbanlist cbans;
 class CommandCban : public Command
 {
  public:
-       CommandCban(InspIRCd* Me) : Command(Me, "CBAN", 'o', 1)
+       CommandCban(InspIRCd* Me) : Command(Me, "CBAN", "o", 1)
        {
                this->source = "m_cban.so";
                this->syntax = "<channel> [<duration> :<reason>]";
                TRANSLATE4(TR_TEXT,TR_TEXT,TR_TEXT,TR_END);
        }
 
-       CmdResult Handle(const char** parameters, int pcnt, User *user)
+       CmdResult Handle(const char* const* parameters, int pcnt, User *user)
        {
                /* syntax: CBAN #channel time :reason goes here */
                /* 'time' is a human-readable timestring, like 2d3h2s. */
@@ -91,12 +91,12 @@ class CommandCban : public Command
                                if(length > 0)
                                {
                                        user->WriteServ("385 %s %s :Added %lu second channel ban (%s)", user->nick, parameters[0], length, reason.c_str());
-                                       ServerInstance->WriteOpers("*** %s added %lu second channel ban on %s (%s)", user->nick, length, parameters[0], reason.c_str());
+                                       ServerInstance->SNO->WriteToSnoMask('A', "%s added %lu second channel ban on %s (%s)", user->nick, length, parameters[0], reason.c_str());
                                }
                                else
                                {
                                        user->WriteServ("385 %s %s :Added permanent channel ban (%s)", user->nick, parameters[0], reason.c_str());
-                                       ServerInstance->WriteOpers("*** %s added permanent channel ban on %s (%s)", user->nick, parameters[0], reason.c_str());
+                                       ServerInstance->SNO->WriteToSnoMask('A', "%s added permanent channel ban on %s (%s)", user->nick, parameters[0], reason.c_str());
                                }
                        }
                        else
@@ -159,7 +159,7 @@ class ModuleCBan : public Module
                        {
                                // Channel is banned.
                                user->WriteServ( "384 %s %s :Cannot join channel, CBANed (%s)", user->nick, cname, iter->reason.c_str());
-                               ServerInstance->WriteOpers("*** %s tried to join %s which is CBANed (%s)", user->nick, cname, iter->reason.c_str());
+                               ServerInstance->SNO->WriteToSnoMask('A', "%s tried to join %s which is CBANed (%s)", user->nick, cname, iter->reason.c_str());
                                return 1;
                        }
                }
@@ -228,7 +228,7 @@ class ModuleCBan : public Module
                                {
                                        if (iter->set_on + iter->length <= ServerInstance->Time())
                                        {
-                                               ServerInstance->WriteOpers("*** %li second CBAN on %s (%s) set on %s expired", iter->length, iter->chname.c_str(), iter->reason.c_str(), ServerInstance->TimeString(iter->set_on).c_str());
+                                               ServerInstance->SNO->WriteToSnoMask('A', "%li second CBAN on %s (%s) set on %s expired", iter->length, iter->chname.c_str(), iter->reason.c_str(), ServerInstance->TimeString(iter->set_on).c_str());
                                                cbans.erase(iter);
                                                go_again = true;
                                        }