fixed discussion namespace
[lhc/web/wiklou.git] / maintenance / mcc.php
index 24ca063..73b03a1 100755 (executable)
@@ -9,6 +9,7 @@
 
 /** */
 require_once( "commandLine.inc" );
+require_once("memcached-client.php");
 
 $mcc = new memcached( array('persistant' => true) );
 $mcc->set_servers( $wgMemCachedServers );
@@ -18,6 +19,7 @@ do {
        $bad = false;
        $quit = false;
        $line = readconsole( "> " );
+       if ($line === false) exit;
        $args = explode( " ", $line );
        $command = array_shift( $args );
        switch ( $command ) {
@@ -36,6 +38,11 @@ do {
                                var_dump( $res );
                        }
                        break;
+               case "getsock":
+                       $res = $mcc->get( $args[0] );
+                       $sock = $mcc->get_sock( $args[0] );
+                       var_dump( $sock );
+                       break;
                case "set":
                        $key = array_shift( $args );
                        if ( $args[0] == "#" && is_numeric( $args[1] ) ) {
@@ -55,7 +62,11 @@ do {
                                print "MemCached error\n";
                        }
                        break;                                 
+               case "dumpmcc":
+                       var_dump( $mcc );
+                       break;
                case "quit":
+               case "exit":
                        $quit = true;
                        break;
                default: