@name All Chat by Jim Dangle
@inputs 
@outputs 
@persist 
@trigger 

runOnChat(1)

if(first() | dupefinished()){
    On =0
    }
    
if(chatClk(owner())){
    Cmd = owner():lastSaid():explode(" ")
    C1 = Cmd:string(1)
    switch(C1){
        case "/on",
        print("All chat on!")
        hideChat(1)
        soundPlay(0,0,"buttons/button19.wav")
        On = 1
        break
        
        case "/off",
        On = 0
        hideChat(1)
        soundPlay(0,0,"buttons/combine_button_locked.wav")
        print("All chat off!")
        break
        }
    }
    
if(On){
if(chatClk(lastSpoke())){
    print(lastSpoke():lastSaid())
    }
}
