[SithNet-Patches] [CVS] Module gnuworld-sithnet: Change committed
Brought to you by:
darthsidious_
|
From: Tim I. <dar...@us...> - 2003-10-24 18:58:49
|
Committer : Tim Ireland <dar...@us...>
CVSROOT : /cvsroot/sithnet-dev
Module : gnuworld-sithnet
Commit time: 2003-10-24 17:45:16 UTC
Modified files:
mod.cservice/SETCommand.cc
Log message:
oops..again.
---------------------- diff included ----------------------
Index: gnuworld-sithnet/mod.cservice/SETCommand.cc
diff -u gnuworld-sithnet/mod.cservice/SETCommand.cc:1.1.1.1 gnuworld-sithnet/mod.cservice/SETCommand.cc:1.2
--- gnuworld-sithnet/mod.cservice/SETCommand.cc:1.1.1.1 Sun Oct 19 10:46:11 2003
+++ gnuworld-sithnet/mod.cservice/SETCommand.cc Fri Oct 24 10:45:05 2003
@@ -33,7 +33,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*
- * $Id: SETCommand.cc,v 1.1.1.1 2003/10/19 17:46:11 darthsidious_ Exp $
+ * $Id: SETCommand.cc,v 1.2 2003/10/24 17:45:05 darthsidious_ Exp $
*/
#include <string>
@@ -45,7 +45,7 @@
#include "responses.h"
#include "cservice_config.h"
-const char SETCommand_cc_rcsId[] = "$Id: SETCommand.cc,v 1.1.1.1 2003/10/19 17:46:11 darthsidious_ Exp $" ;
+const char SETCommand_cc_rcsId[] = "$Id: SETCommand.cc,v 1.2 2003/10/24 17:45:05 darthsidious_ Exp $" ;
namespace gnuworld
{
@@ -672,6 +672,42 @@
option.c_str(),
theChan->getName().c_str(),
theChan->getFlag(sqlChannel::F_STRICTOP) ? "ON" : "OFF");
+ return true;
+ }
+
+ if(option == "STRICTVOICE")
+ {
+ if(level < level::set::strictvoice)
+ {
+ bot->Notice(theClient,
+ bot->getResponse(theUser,
+ language::insuf_access,
+ string("You do not have enough access!")));
+ return true;
+ }
+ if(value == "ON")
+ {
+ theChan->setFlag(sqlChannel::F_STRICTVOICE);
+ if (tmpChan) bot->devoiceAllUnAuthedOnChan(tmpChan);
+ }
+ else if(value == "OFF") theChan->removeFlag(sqlChannel::F_STRICTVOICE);
+ else
+ {
+ bot->Notice(theClient,
+ bot->getResponse(theUser,
+ language::set_cmd_syntax_on_off,
+ string("value of %s must be ON or OFF")).c_str(),
+ option.c_str());
+ return true;
+ }
+ theChan->commit();
+ bot->Notice(theClient,
+ bot->getResponse(theUser,
+ language::set_cmd_status,
+ string("%s for %s is %s")).c_str(),
+ option.c_str(),
+ theChan->getName().c_str(),
+ theChan->getFlag(sqlChannel::F_STRICTVOICE) ? "ON" : "OFF");
return true;
}
----------------------- End of diff -----------------------
|